On Sun, Oct 20, 2013 at 10:01 AM, Stefan Kristiansson <
[email protected]> wrote:

> On Sat, Oct 19, 2013 at 10:11 PM, Raul Fajardo <[email protected]> wrote:
>
>> Hi Stefan,
>>
>> it worked. The toolchain can now be compiled under OSX, with both newlib
>> and uclib.
>>
>>
>>
> Unfortunately it seems like it breaks the build on other platforms...
> Would  something like below still work on OSX?
>

Yes, if you correct the string comparison with darwin. It requires some
missing wildcards at the beginning. Correction below.


> And what happens if you try to build without enabled_shared?
>

OpenCores Wiki says to compile with --enable-shared for the newlib
toolchain. It works with -disable-shared as well. But it still requires the
patch.

Did the patch fail with multiple definitions or something? The failure
shown at the website forum does not relate to this. I have also heard about
some Debian complains about binutils dependency on gettext. Is it possible
that the workaround should also be for Linux in some extent?


>
> Stefan
>

diff --git a/bfd/configure b/bfd/configure
index 34d1992..a864024 100755
--- a/bfd/configure
+++ b/bfd/configure
@@ -15079,7 +15079,7 @@ SHARED_LDFLAGS=
 if test "$enable_shared" = "yes"; then
   x=`sed -n -e 's/^[   ]*PICFLAG[      ]*=[    ]*//p' <
../libiberty/Makefile | sed -n '$p'`
   if test -n "$x"; then
-    SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty
-lintl"
+    SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
   fi

 # More hacks to build DLLs on Windows.
@@ -15088,6 +15088,9 @@ if test "$enable_shared" = "yes"; then
     SHARED_LDFLAGS="-no-undefined"
     SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl
-lcygwin -lkernel32"
   ;;
+  *-*-darwin*)
+    SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty
-lintl"
+  ;;
   esac

   if test -n "$SHARED_LIBADD"; then
diff --git a/bfd/configure.in b/bfd/configure.in
index e30dc45..6ae31ef 100644
--- a/bfd/configure.in
+++ b/bfd/configure.in
@@ -568,7 +568,7 @@ changequote(,)dnl
   x=`sed -n -e 's/^[   ]*PICFLAG[      ]*=[    ]*//p' <
../libiberty/Makefile | sed -n '$p'`
 changequote([,])dnl
   if test -n "$x"; then
-    SHARED_LIBADD="-L`pwd`/../libiberty/pic -L`pwd`/../intl -liberty
-lintl"
+    SHARED_LIBADD="-L`pwd`/../libiberty/pic -liberty"
   fi

 # More hacks to build DLLs on Windows.
@@ -577,6 +577,9 @@ changequote([,])dnl
     SHARED_LDFLAGS="-no-undefined"
     SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl
-lcygwin -lkernel32"
   ;;
+  *-*-darwin*)
+    SHARED_LIBADD="-L`pwd`/../libiberty -liberty -L`pwd`/../intl -lintl"
+  ;;
   esac

   if test -n "$SHARED_LIBADD"; then
_______________________________________________
OpenRISC mailing list
[email protected]
http://lists.openrisc.net/listinfo/openrisc

Reply via email to