Skip to contentSkip to conversation

build: Explict libtool tag. Preserve CFLAGS/CPPFLAGS.

PATCH In review Arkadiusz Miśkiewicz 2 participants 2 messages Feb 1, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: Explict libtool tag. Preserve CFLAGS/CPPFLAGS.

Use explict libtool CC tag (sometimes libtool can't decide what tag is correct one if omited).

Preserve CFLAGS/CPPFLAGS to allow:
CPPFLAGS="-I$HOME/here-is-xfsprogs-installed/include" \
LDFLAGS="-L$HOME/here-is-xfsprogs-installed/lib" \
./configure ...

---
 include/builddefs.in |    4 +++-
 include/buildmacros  |    4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)
include/builddefs.in +3 -1
index d855c89..636f632 100644
@@ -11,6 +11,8 @@ DEBUG = @debug_build@
 OPTIMIZER = @opt_build@
 MALLOCLIB = @malloc_lib@
 LOADERFLAGS = @LDFLAGS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
 
 LIBXFS = @libxfs@
 LIBACL = @libacl@
@@ -75,7 +77,7 @@ ifeq ($(PKG_PLATFORM),freebsd)
 DEPENDFLAGS = -D__FreeBSD__
 endif
 
-GCFLAGS = $(OPTIMIZER) $(DEBUG) \
+GCFLAGS = $(OPTIMIZER) $(DEBUG) $(CPPFLAGS) \
 	-I$(TOPDIR)/include -DVERSION=\"$(PKG_VERSION)\"
 
 # Global, Platform, Local CFLAGS
include/buildmacros +2 -2
index 801bcb6..276d2c8 100644
@@ -41,10 +41,10 @@ LIBNAME = $(basename $(LTLIBRARY))
 LTOBJECTS = $(OBJECTS:.o=.lo)
 LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
 
-LTLINK = $(LIBTOOL) --mode=link $(CC)
+LTLINK = $(LIBTOOL) --tag=CC --mode=link $(CC)
 LTEXEC = $(LIBTOOL) --mode=execute
 LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CCF)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CCF)
 
 ifeq ($(ENABLE_SHARED),yes)
 LTLDFLAGS += -rpath $(PKG_LIB_DIR)
Signature · 6 lines
1.6.1.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#1 lore raw
Quoted 2 lines · Arkadiusz Miśkiewicz

Use explict libtool CC tag (sometimes libtool can't decide what tag is correct one if omited).

Seems good to me. I'll push this on the kernel.org repo, thanks.

(This is against xfstests, based on irc conversation) :)

-Eric

Quoted 40 lines

Preserve CFLAGS/CPPFLAGS to allow:
CPPFLAGS="-I$HOME/here-is-xfsprogs-installed/include" \
LDFLAGS="-L$HOME/here-is-xfsprogs-installed/lib" \
./configure ...

---
 include/builddefs.in |    4 +++-
 include/buildmacros  |    4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)
include/builddefs.in +3 -1
index d855c89..636f632 100644
@@ -11,6 +11,8 @@ DEBUG = @debug_build@
 OPTIMIZER = @opt_build@
 MALLOCLIB = @malloc_lib@
 LOADERFLAGS = @LDFLAGS@
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
 
 LIBXFS = @libxfs@
 LIBACL = @libacl@
@@ -75,7 +77,7 @@ ifeq ($(PKG_PLATFORM),freebsd)
 DEPENDFLAGS = -D__FreeBSD__
 endif
 
-GCFLAGS = $(OPTIMIZER) $(DEBUG) \
+GCFLAGS = $(OPTIMIZER) $(DEBUG) $(CPPFLAGS) \
 	-I$(TOPDIR)/include -DVERSION=\"$(PKG_VERSION)\"
 
 # Global, Platform, Local CFLAGS
include/buildmacros +0 -0
index 801bcb6..276d2c8 100644
@@ -41,10 +41,10 @@ LIBNAME = $(basename $(LTLIBRARY))
 LTOBJECTS = $(OBJECTS:.o=.lo)
 LTVERSION = $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)

include/buildmacros LIBNAME = $(basename $(LTLIBRARY)) · line 50

Quoted 10 lines
include/buildmacros +2 -2
 
-LTLINK = $(LIBTOOL) --mode=link $(CC)
+LTLINK = $(LIBTOOL) --tag=CC --mode=link $(CC)
 LTEXEC = $(LIBTOOL) --mode=execute
 LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CCF)
+LTCOMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CCF)
 
 ifeq ($(ENABLE_SHARED),yes)
 LTLDFLAGS += -rpath $(PKG_LIB_DIR)

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs