libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Add $CPPFLAGS $CFLAGS to early-libtool.at


From: Albert Chin
Subject: Add $CPPFLAGS $CFLAGS to early-libtool.at
Date: Thu, 18 May 2006 04:04:47 -0500
User-agent: Mutt/1.5.6i

The HP compiler on HP-UX 10.20 doesn't operate in ANSI mode by
default. You need to add -Ae to $CFLAGS. However,
tests/early-libtool.at assumes the compiler is ANSI-compliant by
default. This causes test 37 and 38 to fail on this platform because
the .c files compiled require an ANSI compiler.

2005-06-18  Albert Chin-A-Young <address@hidden>

        * tests/early-libtool.at: Pass $CPPFLAGS and $CFLAGS to
        compiler when compiling for extra flags that might be
        needed for ANSI-compliance, 64-bit, etc. The environment
        we compile with should match the environment libtool was
        compiled with.

-- 
albert chin (address@hidden)

-- snip snip
Index: tests/early-libtool.at
===================================================================
RCS file: /cvsroot/libtool/libtool/tests/early-libtool.at,v
retrieving revision 1.7
diff -u -p -r1.7 early-libtool.at
--- tests/early-libtool.at      4 Dec 2005 14:48:09 -0000       1.7
+++ tests/early-libtool.at      18 May 2006 08:38:17 -0000
@@ -44,9 +44,13 @@ EXEEXT = @EXEEXT@
 LIBTOOL = @LIBTOOL@
 OBJEXT = @OBJEXT@
 
-COMPILE = $(CC) $(DEFAULT_INCLUDES)
-LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(DEFAULT_INCLUDES)
-LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES)
+LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(CC) $(CPPFLAGS) $(CFLAGS) 
$(DEFAULT_INCLUDES)
+LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) -o $@
 
 all: hell$(EXEEXT)
 
@@ -135,10 +139,10 @@ hello (void)
 _EOF
 
 # Prove that we can run libtool from inside configure:
-$SHELL ./libtool --mode=compile --tag=CC "$CC" -I. -I$srcdir \
-    -c -o hello.lo hello.c  || exit 1
-$SHELL ./libtool --mode=link --tag=CC "$CC" -o libhello.la \
-    -rpath /notexist hello.lo || exit 1
+$SHELL ./libtool --mode=compile --tag=CC "$CC" $CPPFLAGS $CFLAGS \
+    -I. -I$srcdir -c -o hello.lo hello.c  || exit 1
+$SHELL ./libtool --mode=link --tag=CC "$CC" $CFLAGS $LDFLAGS \
+    -o libhello.la -rpath /notexist hello.lo || exit 1
 
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
@@ -154,8 +158,12 @@ EXEEXT = @EXEEXT@
 LIBTOOL = @LIBTOOL@
 OBJEXT = @OBJEXT@
 
-COMPILE = $(CC) $(DEFAULT_INCLUDES)
-LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) -o $@
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+
+COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) $(DEFAULT_INCLUDES)
+LINK = $(LIBTOOL) --mode=link --tag=CC $(CC) $(CFLAGS) $(LDFLAGS) -o $@
 
 hell$(EXEEXT): main.$(OBJEXT) libhello.la
        $(LINK) main.$(OBJEXT) libhello.la




reply via email to

[Prev in Thread] Current Thread [Next in Thread]