This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, x86, Darwin] update darwin's x86 output.
- From: IainS <developer at sandoe-acoustics dot co dot uk>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Mike Stump <mrs at gcc dot gnu dot org>, Richard Henderson <rth at redhat dot com>
- Date: Sun, 31 Oct 2010 20:58:08 +0000
- Subject: Re: [Patch, x86, Darwin] update darwin's x86 output.
- References: <AANLkTinX3haOLi5Z1TpKJoZ+U4rrL6xPJ4G0ONVtnwOz@mail.gmail.com>
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) $<