This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, x86, Darwin] update darwin's x86 output.



On 31 Oct 2010, at 20:34, Uros Bizjak wrote:


Hello!

It makes the stub choices and sections agree with those used by the Darwin system tools, and also finally enables -mdynamic-no-pic for i686-darwin.

Can you test -mdynamic-no-pic with attached patch (you will have to regenerate configure and reconfigure gcc) by bootstrapping gcc?

-  powerpc-*-darwin*)
+  *-*-darwin*)
    host_makefile_frag="config/mh-ppc-darwin"

Well, I had an mh-x86-darwin in my local tree for the last few months.. :-)


I'm re-running it to make sure on a clean tree.
Iain

====

P.S.

The reason I did not include it in the patch is because it requires a tangential config fix for plugins...
... reported a while back for powerpc ...
because - mdynamic-no-pic produces a warning when specified together with -fPIC


you need to add something like these as well :

Index: gcc/configure.ac
===================================================================
--- gcc/configure.ac    (revision 166060)
+++ gcc/configure.ac    (working copy)
@@ -4715,11 +4715,15 @@ if test x"$enable_plugin" = x"yes"; then

   # Check that we can build shared objects with -fPIC -shared
   saved_LDFLAGS="$LDFLAGS"
+  saved_CFLAGS="$CFLAGS"
   case "${host}" in
     *-*-darwin*)
-      LDFLAGS="$LDFLAGS -fPIC -shared -undefined dynamic_lookup"
+      CFLAGS=`echo $CFLAGS | sed s/-mdynamic-no-pic//g`
+      CFLAGS="$CFLAGS -fPIC"
+      LDFLAGS="$LDFLAGS -shared -undefined dynamic_lookup"
     ;;
     *)
+      CFLAGS="$CFLAGS -fPIC"
       LDFLAGS="$LDFLAGS -fPIC -shared"
     ;;
   esac
@@ -4733,6 +4737,7 @@ if test x"$enable_plugin" = x"yes"; then
     enable_plugin=no
   fi
   LDFLAGS="$saved_LDFLAGS"
+  CFLAGS="$saved_CFLAGS"

   # If plugin support had been requested but not available, fail.
   if test x"$enable_plugin" = x"no" ; then


Index: gcc/config/x-darwin
===================================================================
--- gcc/config/x-darwin (revision 166060)
+++ gcc/config/x-darwin (working copy)
@@ -1,3 +1,4 @@
+PLUGINCFLAGS := $(filter-out -mdynamic-no-pic, $(PLUGINCFLAGS))
host-darwin.o : $(srcdir)/config/host-darwin.c $(CONFIG_H) $ (SYSTEM_H) \
coretypes.h toplev.h config/host-darwin.h
$(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $ (INCLUDES) $<




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]