Re: [PATCH] pass --tag to libtool

2012-01-04 Thread Igor Galić


- Original Message -
>
>
> - Original Message -
> > Hi,
> >
> > although I have not investigated this further, libtool appears to
> > be
> > able to derive the language of the code that is being compiled from
> > the
> > name of the compiler in some cases, e.g. for gcc or g++.
> >
> > With clang and clang++ this does not seem to be the case, so that
> > --tag=CC needs to be passed explicitly.
>
> Weird, I don't remember ever having had trouble compiling
> APR or APR-util with clang.
>
> Anyway, +1 from me.
>
> p.s.: Next time, please tag your thread as: [PATCH] so it
> can be identified easier.

Maybe also create a bug report in Bugzilla and attach the
patches there as well. (Marking it as PatchAvail)
Patches should be created against trunk (and potentially
against other branches, if it's not easily backportable)

Did I forget anything?

If not, I should store this in a template for next time :)

> > I've attached patches that do just that. With both patches applied,
> > clang compiles and links apr 1.4.5 and apr-util 1.4.1 just fine;
> > they
> > pass their respective test suites afterwards, too.
> >
> >
> > Best regards,
> >
> > Elias Pipping
>
> i
>
> --
> Igor Galić
>
> Tel: +43 (0) 664 886 22 883
> Mail: [email protected]
> URL: http://brainsware.org/
> GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE
>
>


Re: [PATCH] pass --tag to libtool

2012-01-04 Thread Igor Galić


- Original Message -
> Hi,
>
> although I have not investigated this further, libtool appears to be
> able to derive the language of the code that is being compiled from
> the
> name of the compiler in some cases, e.g. for gcc or g++.
>
> With clang and clang++ this does not seem to be the case, so that
> --tag=CC needs to be passed explicitly.

Weird, I don't remember ever having had trouble compiling
APR or APR-util with clang.

Anyway, +1 from me.

p.s.: Next time, please tag your thread as: [PATCH] so it
can be identified easier.

> I've attached patches that do just that. With both patches applied,
> clang compiles and links apr 1.4.5 and apr-util 1.4.1 just fine; they
> pass their respective test suites afterwards, too.
>
>
> Best regards,
>
> Elias Pipping

i

--
Igor Galić

Tel: +43 (0) 664 886 22 883
Mail: [email protected]
URL: http://brainsware.org/
GPG: 6880 4155 74BD FD7C B515  2EA5 4B1D 9E08 A097 C9AE



pass --tag to libtool

2012-01-01 Thread Elias Pipping
Hi,

although I have not investigated this further, libtool appears to be
able to derive the language of the code that is being compiled from the
name of the compiler in some cases, e.g. for gcc or g++.

With clang and clang++ this does not seem to be the case, so that
--tag=CC needs to be passed explicitly.

I've attached patches that do just that. With both patches applied,
clang compiles and links apr 1.4.5 and apr-util 1.4.1 just fine; they
pass their respective test suites afterwards, too.


Best regards,

Elias Pipping

Source: Elias Pipping 
Upstream: no
Reason: Pass --tag=CC to libtool

---
 configure.in |4 ++--
 test/Makefile.in |8 
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/configure.in b/configure.in
index 9c20dd7..ec9fd96 100644
--- a/configure.in
+++ b/configure.in
@@ -281,9 +281,9 @@ AC_ARG_WITH(libtool, [  --without-libtool   avoid using libtool to link the
   [ use_libtool=$withval ], [ use_libtool="yes" ] )
 
 if test "x$use_libtool" = "xyes"; then
-  lt_compile='$(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -o $@ -c $< && touch $@'
+  lt_compile='$(LIBTOOL) $(LTFLAGS) --tag=CC --mode=compile $(COMPILE) -o $@ -c $< && touch $@'
   LT_VERSION="-version-info `$get_version libtool $version_hdr APR`"
-  link="\$(LIBTOOL) \$(LTFLAGS) --mode=link \$(LT_LDFLAGS) \$(COMPILE) \$(LT_VERSION) \$(ALL_LDFLAGS) -o \$@"
+  link="\$(LIBTOOL) \$(LTFLAGS) --tag=CC --mode=link \$(LT_LDFLAGS) \$(COMPILE) \$(LT_VERSION) \$(ALL_LDFLAGS) -o \$@"
   so_ext='lo'
   lib_target='-rpath $(libdir) $(OBJECTS)'
   export_lib_target='-rpath \$(libdir) \$(OBJECTS)'
diff --git a/test/Makefile.in b/test/Makefile.in
index b371074..f711c40 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -67,7 +67,7 @@ INCLUDES=-I$(INCDIR) -I$(srcdir)/../include
 
 # link programs using -no-install to get real executables not
 # libtool wrapper scripts which link an executable when first run.
-LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) \
+LINK_PROG = $(LIBTOOL) $(LTFLAGS) --tag=CC --mode=link $(LT_LDFLAGS) $(COMPILE) \
 	@LT_NO_INSTALL@ $(ALL_LDFLAGS) -o $@
 
 # STDTEST_PORTABLE;
@@ -115,18 +115,18 @@ globalmutexchild@EXEEXT@: $(OBJECTS_globalmutexchild)
 
 # Note -prefer-pic is only supported with libtool-1.4+
 mod_test.lo: $(srcdir)/mod_test.c
-	$(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) -prefer-pic -o $@ \
+	$(LIBTOOL) $(LTFLAGS) --tag=CC --mode=compile $(COMPILE) -prefer-pic -o $@ \
 	  -c $(srcdir)/mod_test.c
 
 OBJECTS_mod_test = mod_test.lo
 mod_test.la: $(OBJECTS_mod_test)
-	$(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -rpath `pwd` -module \
+	$(LIBTOOL) $(LTFLAGS) --tag=CC --mode=link $(COMPILE) -rpath `pwd` -module \
 	  -avoid-version $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ \
 	  $(OBJECTS_mod_test)
 
 OBJECTS_libmod_test = mod_test.lo $(LOCAL_LIBS)
 libmod_test.la: $(OBJECTS_libmod_test)
-	$(LIBTOOL) $(LTFLAGS) --mode=link $(COMPILE) -rpath `pwd` \
+	$(LIBTOOL) $(LTFLAGS) --tag=CC --mode=link $(COMPILE) -rpath `pwd` \
 	  -avoid-version $(LT_LDFLAGS) $(ALL_LDFLAGS) -o $@ \
 	  $(OBJECTS_libmod_test) $(ALL_LIBS)
 
-- 
1.7.8

Source: Elias Pipping 
Upstream: no
Reason: Pass --tag=CC to libtool

---
 test/Makefile.in |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/test/Makefile.in b/test/Makefile.in
index cf89a54..9a4ca42 100644
--- a/test/Makefile.in
+++ b/test/Makefile.in
@@ -34,7 +34,7 @@ APRUTIL_LDFLAGS = $(ALL_LDFLAGS) @LT_NO_INSTALL@ @APRUTIL_LDFLAGS@
 
 # link programs using -no-install to get real executables not
 # libtool wrapper scripts which link an executable when first run.
-LINK_PROG = $(LIBTOOL) $(LTFLAGS) --mode=link $(LT_LDFLAGS) $(COMPILE) \
+LINK_PROG = $(LIBTOOL) $(LTFLAGS) --tag=CC --mode=link $(LT_LDFLAGS) $(COMPILE) \
 	$(APRUTIL_LDFLAGS) -o $@
 
 # STDTEST_PORTABLE;
-- 
1.7.8