Date: Wed, 12 Aug 2009 01:15:49 -0400 From: Ryan Flynn <parseerror@gmail.com> To: gnome@FreeBSD.org Subject: libiconv patch to build with llvm/clang c compiler Message-ID: <a3f15ee60908112215o6834beday7751706675b9b2db@mail.gmail.com>
index | next in thread | raw e-mail
[-- Attachment #1 --]
Hello,
Attached is a patch that allows the libiconv port to build with the
llvm/clang C compiler.
It updates a few existing patches and adds 2 new ones, basically just
adding --tag=CC under libtool,
since apparently it is unable to discern that clang is a c compiler.
With this patch libiconv builds
(with a few minor warnings from clang related to the source) and
passes "make check".
A couple of people have been working to get FreeBSD compiling under clang:
http://wiki.freebsd.org/BuildingFreeBSDWithClang
and from these results
http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-June/005274.html
it appears that getting libiconv building with clang will be helpful
towards that effort.
Please let me know if this patch is usable, and if not what I can do.
Thanks
Ryan
[-- Attachment #2 --]
diff -ruN libiconv.orig/files/patch-lib_Makefile.in libiconv/files/patch-lib_Makefile.in
--- libiconv.orig/files/patch-lib_Makefile.in 2009-06-16 01:05:39.000000000 +0000
+++ libiconv/files/patch-lib_Makefile.in 2009-08-11 23:39:49.000000000 +0000
@@ -1,5 +1,16 @@
--- lib/Makefile.in.orig 2009-03-25 22:14:26.000000000 -0400
+++ lib/Makefile.in 2009-06-06 15:26:31.000000000 -0400
+@@ -26,8 +26,8 @@
+ -Dset_relocation_prefix=libiconv_set_relocation_prefix \
+ -Drelocate=libiconv_relocate @DEFS@
+ LIBTOOL = @LIBTOOL@
+-LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
+-LIBTOOL_LINK = $(LIBTOOL) --mode=link
++LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile --tag=CC
++LIBTOOL_LINK = $(LIBTOOL) --mode=link --tag=CC
+ LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
+ LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
+ # Windows resource compiler (windres). Used via libtool.
@@ -50,7 +50,7 @@ SHELL = /bin/sh
# Before making a release, change this according to the libtool documentation,
diff -ruN libiconv.orig/files/patch-libcharset::lib::Makefile.in libiconv/files/patch-libcharset::lib::Makefile.in
--- libiconv.orig/files/patch-libcharset::lib::Makefile.in 1970-01-01 00:00:00.000000000 +0000
+++ libiconv/files/patch-libcharset::lib::Makefile.in 2009-08-11 23:44:32.000000000 +0000
@@ -0,0 +1,13 @@
+--- libcharset/lib/Makefile.in.orig Thu Jan 30 03:43:59 2003
++++ libcharset/lib/Makefile.in Tue Oct 14 16:55:29 2003
+@@ -25,8 +25,8 @@
+ -Dset_relocation_prefix=libcharset_set_relocation_prefix \
+ -Drelocate=libcharset_relocate @DEFS@
+ LIBTOOL = @LIBTOOL@
+-LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
+-LIBTOOL_LINK = $(LIBTOOL) --mode=link
++LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile --tag=CC
++LIBTOOL_LINK = $(LIBTOOL) --mode=link --tag=CC
+ LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
+ LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
+ RM = rm -f
diff -ruN libiconv.orig/files/patch-src::Makefile.in libiconv/files/patch-src::Makefile.in
--- libiconv.orig/files/patch-src::Makefile.in 2009-07-05 01:06:52.000000000 +0000
+++ libiconv/files/patch-src::Makefile.in 2009-08-11 23:39:49.000000000 +0000
@@ -1,5 +1,16 @@
--- src/Makefile.in.orig 2009-06-21 07:17:33.000000000 -0400
+++ src/Makefile.in 2009-07-04 19:46:15.000000000 -0400
+@@ -23,8 +23,8 @@
+ LDFLAGS = @LDFLAGS@
+ INCLUDES = -I. -I$(srcdir) -I.. -I../include -I$(srcdir)/../include -I../srclib -I$(srcdir)/../srclib
+ LIBTOOL = @LIBTOOL@
+-LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
+-LIBTOOL_LINK = $(LIBTOOL) --mode=link
++LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile --tag=CC
++LIBTOOL_LINK = $(LIBTOOL) --mode=link --tag=CC
+ LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
+ LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
+ WINDRES = @WINDRES@
@@ -113,6 +113,7 @@ install : all force
if [ ! -d $(DESTDIR)$(bindir) ] ; then $(mkinstalldirs) $(DESTDIR)$(bindir) ; fi
case "@host_os@" in \
diff -ruN libiconv.orig/files/patch-test::Makefile.in libiconv/files/patch-test::Makefile.in
--- libiconv.orig/files/patch-test::Makefile.in 1970-01-01 00:00:00.000000000 +0000
+++ libiconv/files/patch-test::Makefile.in 2009-08-11 23:58:08.000000000 +0000
@@ -0,0 +1,13 @@
+--- tests/Makefile.in.orig 2009-08-11 23:52:40.000000000 +0000
++++ tests/Makefile.in 2009-08-11 23:56:06.000000000 +0000
+@@ -12,8 +12,8 @@
+ LDFLAGS = @LDFLAGS@
+ INCLUDES = -I. -I$(srcdir) -I../include -I$(srcdir)/../include -I../srclib -I$(srcdir)/../srclib -I../lib
+ LIBTOOL = @LIBTOOL@
+-LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile
+-LIBTOOL_LINK = $(LIBTOOL) --mode=link
++LIBTOOL_COMPILE = $(LIBTOOL) --mode=compile --tag=CC
++LIBTOOL_LINK = $(LIBTOOL) --mode=link --tag=CC
+ LIBTOOL_INSTALL = $(LIBTOOL) --mode=install
+ LIBTOOL_UNINSTALL = $(LIBTOOL) --mode=uninstall
+ RM = rm -f
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?a3f15ee60908112215o6834beday7751706675b9b2db>
