Date: Thu, 21 Nov 2013 21:01:35 GMT From: Ryan Frederick <ryanrfrederick@gmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/184150: Patch to Allow irc/unreal to Run When Compiled with Clang/LLVM Message-ID: <201311212101.rALL1ZIS073904@oldred.freebsd.org> Resent-Message-ID: <201311212110.rALLA0UR072669@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 184150 >Category: ports >Synopsis: Patch to Allow irc/unreal to Run When Compiled with Clang/LLVM >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Thu Nov 21 21:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Ryan Frederick >Release: 10.0-BETA3 >Organization: >Environment: FreeBSD system.name 10.0-BETA3 FreeBSD 10.0-BETA3 #0 r257580: Sun Nov 3 19:43:01 UTC 2013 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: Currently irc/unreal does not run when compiled with Clang/LLVM due to implicitly expecting the compiler to use the GNU89 standard (Clang/LLVM uses the C99 standard by default). Attached is a patch to create two patch files that edit configure and configure.ac to explicitly pass the -std=gnu89 option to the compiler and also to ensure that the -export-dynamic option is specifically passed to the linker. These patches have also been submitted upstream (http://bugs.unrealircd.org/view.php?id=4239), but no estimated fix time is currently known. >How-To-Repeat: >Fix: Patch attached with submission follows: diff -ruN unreal.old/files/patch-configure unreal/files/patch-configure --- unreal.old/files/patch-configure 1969-12-31 18:00:00.000000000 -0600 +++ unreal/files/patch-configure 2013-11-21 14:38:32.673603000 -0600 @@ -0,0 +1,20 @@ +--- configure 2013-04-05 09:29:24.000000000 -0500 ++++ configure 2013-11-21 14:14:43.831143243 -0600 +@@ -6356,7 +6356,7 @@ + + + hold_cflags=$CFLAGS +-CFLAGS="$CFLAGS -export-dynamic" ++CFLAGS="$CFLAGS -Wl,-export-dynamic" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need the -export-dynamic flag" >&5 + $as_echo_n "checking if we need the -export-dynamic flag... " >&6; } + if ${ac_cv_export_dynamic+:} false; then : +@@ -6395,7 +6395,7 @@ + else + + if test "$ac_cv_c_compiler_gnu" = "yes"; then +- ac_cv_pic="-fPIC -DPIC -shared" ++ ac_cv_pic="-std=gnu89 -fPIC -DPIC -shared" + case `uname -s` in + Darwin*) + ac_cv_pic="-bundle -flat_namespace -undefined suppress" diff -ruN unreal.old/files/patch-configure.ac unreal/files/patch-configure.ac --- unreal.old/files/patch-configure.ac 1969-12-31 18:00:00.000000000 -0600 +++ unreal/files/patch-configure.ac 2013-11-21 14:38:56.017645000 -0600 @@ -0,0 +1,20 @@ +--- configure.ac 2013-04-05 09:29:24.000000000 -0500 ++++ configure.ac 2013-11-21 14:15:13.421756932 -0600 +@@ -107,7 +107,7 @@ + ])]) + + hold_cflags=$CFLAGS +-CFLAGS="$CFLAGS -export-dynamic" ++CFLAGS="$CFLAGS -Wl,-export-dynamic" + AC_CACHE_CHECK(if we need the -export-dynamic flag, ac_cv_export_dynamic, [ + AC_TRY_LINK(, [int i];, ac_cv_export_dynamic=yes, ac_cv_export_dynamic=no)]) + if test "$ac_cv_export_dynamic" = "no"; then +@@ -116,7 +116,7 @@ + + AC_CACHE_CHECK(for compiler option to produce PIC,ac_cv_pic,[ + if test "$ac_cv_prog_gcc" = "yes"; then +- ac_cv_pic="-fPIC -DPIC -shared" ++ ac_cv_pic="-std=gnu89 -fPIC -DPIC -shared" + case `uname -s` in + Darwin*[)] + ac_cv_pic="-bundle -flat_namespace -undefined suppress" >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201311212101.rALL1ZIS073904>