This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: RFC: Do not install specs file
On Dec 20, 2004, Mark Mitchell <mark@codesourcery.com> wrote:
> Alexandre Oliva wrote:
>> Hopefully we'll some day be able to get rid of this hack. I'm told we
>> can already, but I haven't had a chance to verify this.
> Would you look into that, at your convenience?
The attached patch appears to get mips64-linux-gnu to behave as
intended, while removing the hideous hack I introduced some time ago.
The only functional change is that I think someone that runs
mips64-linux-gnu-gcc -print-file-name=libgcc_s.so will now get the n32
lib, instead of the o32 lib you'd get before.
> As that seems to be the only configuration that uses SPECS, we could
> simplify Makefiles and such a bit if this could go away.
Actually... While looking into the problem I found out I was
mistaken: $(SPECS) is supposed to be the specs file that is to get
installed, extracted with -dumpspecs. What the SPECS setting enables
is for someone to use an alternate specs file at build time, but the
one that is built into gcc is the one to be used after install time,
so we can refrain from installing it, after all. Sorry about my
incorrect objection. Under this new light, the original could have
gone in.
Anyhow, here's the patch to take the specs hacking out of
mips64-linux-gnu. Ok for mainline? Tested with a cross
x86_64-linux-gnu-x-mips64-linux-gnu build.
Index: gcc/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* config/mips/t-linux64: Remove code that messed with $(SPECS).
(MULTILIB_OPTIONS, MULTILIB_DIRNAMES, MULTILIB_OSDIRNAMES): Move
n32 to the front.
(MULTILIB_EXTRA_OPTS, CRTSTUFF_T_CFLAGS, CRTSTUFF_T_CFLAGS_S):
Removed.
* config/mips/linux64.h (DRIVER_SELF_SPECS): Don't handle
-mabi-fake-default.
(SUBTARGET_TARGET_SWITCHES): Likewise.
Index: gcc/config/mips/linux64.h
===================================================================
RCS file: /cvs/uberbaum/gcc/config/mips/linux64.h,v
retrieving revision 1.8
diff -u -p -r1.8 linux64.h
--- gcc/config/mips/linux64.h 15 Jun 2004 17:12:15 -0000 1.8
+++ gcc/config/mips/linux64.h 21 Dec 2004 04:25:17 -0000
@@ -30,14 +30,9 @@ Boston, MA 02111-1307, USA. */
{ "driver_default_abi_self_spec", DRIVER_DEFAULT_ABI_SELF_SPEC },
#define DRIVER_SELF_SPECS \
"%{!EB:%{!EL:%(endian_spec)}}", \
-"%{mabi-fake-default:%{!mabi=*:-mabi=32}}", \
"%(driver_default_abi_self_spec)", \
"%{!mips*:%{!march=*:%{mabi=32:-mips1}%{mabi=n32|mabi=64:-mips3}}}"
-#undef SUBTARGET_TARGET_SWITCHES
-#define SUBTARGET_TARGET_SWITCHES \
- { "abi-fake-default", 0, N_("Same as -mabi=32, just trickier") },
-
#undef SUBTARGET_ASM_SPEC
#define SUBTARGET_ASM_SPEC "\
%{!fno-PIC:%{!fno-pic:-KPIC}} \
Index: gcc/config/mips/t-linux64
===================================================================
RCS file: /cvs/uberbaum/gcc/config/mips/t-linux64,v
retrieving revision 1.3
diff -u -p -r1.3 t-linux64
--- gcc/config/mips/t-linux64 4 Jun 2003 05:35:15 -0000 1.3
+++ gcc/config/mips/t-linux64 21 Dec 2004 04:25:17 -0000
@@ -1,6 +1,6 @@
-MULTILIB_OPTIONS = mabi=32/mabi=n32/mabi=64
-MULTILIB_DIRNAMES = o32 32 64
-MULTILIB_OSDIRNAMES = ../lib ../lib32 ../lib64
+MULTILIB_OPTIONS = mabi=n32/mabi=32/mabi=64
+MULTILIB_DIRNAMES = 32 o32 64
+MULTILIB_OSDIRNAMES = ../lib32 ../lib ../lib64
EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o crtbeginS.o crtendS.o crtbeginT.o
@@ -17,27 +17,3 @@ tp-bit.c: $(srcdir)/config/fp-bit.c
echo '# define TFLOAT' >> tp-bit.c
cat $(srcdir)/config/fp-bit.c >> tp-bit.c
echo '#endif' >> tp-bit.c
-
-# This arranges for us to extract the built-in specs of the compiler
-# into specs.install. It's this file that we're going to install as
-# specs. Howver, at toolchain build time, we must use specs that
-# enforce the defaults that the compiler expects, namely, the o32 ABI,
-# instead of n32, that we want to use as the default post install.
-SPECS = specs.install
-specs: specs.install
- # Changing the build-time default ABI from n32 to o32
- # The post-install default ABI will remain n32
- @if test "x`grep '!mabi=\*:-mabi=n32' specs.install`" = \
- "x%{!mabi=*:-mabi=n32}"; then \
- sed 's,\(!mabi=\*:-mabi\)=n32,\1=32,' < specs.install > $@ ; \
- else \
- echo failed, gcc/config/mips/t-linux64 needs updating >&2; \
- false; \
- fi
-
-# This arranges for anyone who uses gcc -print-multi-lib post
-# installation to get lists of options for each multilib to get
-# options that actually work.
-MULTILIB_EXTRA_OPTS = mabi-fake-default
-CRTSTUFF_T_CFLAGS = -mabi-fake-default
-CRTSTUFF_T_CFLAGS_S = -mabi-fake-default
--
Alexandre Oliva http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}