|
|
dc1507 |
--- libada/Makefile.in.jj 2009-01-14 12:07:35.000000000 +0100
|
|
|
dc1507 |
+++ libada/Makefile.in 2009-01-15 14:25:33.000000000 +0100
|
|
|
dc1507 |
@@ -69,18 +69,40 @@ version := $(shell cat $(srcdir)/../gcc/
|
|
|
dc1507 |
libsubdir := $(libdir)/gcc/$(target_noncanonical)/$(version)$(MULTISUBDIR)
|
|
|
dc1507 |
ADA_RTS_DIR=$(GCC_DIR)/ada/rts$(subst /,_,$(MULTISUBDIR))
|
|
|
dc1507 |
|
|
|
dc1507 |
+DEFAULTMULTIFLAGS :=
|
|
|
dc1507 |
+ifeq ($(MULTISUBDIR),)
|
|
|
dc1507 |
+targ:=$(subst -, ,$(target))
|
|
|
dc1507 |
+arch:=$(word 1,$(targ))
|
|
|
dc1507 |
+ifeq ($(words $(targ)),2)
|
|
|
dc1507 |
+osys:=$(word 2,$(targ))
|
|
|
dc1507 |
+else
|
|
|
dc1507 |
+osys:=$(word 3,$(targ))
|
|
|
dc1507 |
+endif
|
|
|
dc1507 |
+ifeq ($(strip $(filter-out i%86 x86_64 powerpc% ppc% s390% sparc% linux%, $(arch) $(osys))),)
|
|
|
dc1507 |
+ifeq ($(shell $(CC) $(CFLAGS) -print-multi-os-directory),../lib64)
|
|
|
dc1507 |
+DEFAULTMULTIFLAGS := -m64
|
|
|
dc1507 |
+else
|
|
|
dc1507 |
+ifeq ($(strip $(filter-out s390%, $(arch))),)
|
|
|
dc1507 |
+DEFAULTMULTIFLAGS := -m31
|
|
|
dc1507 |
+else
|
|
|
dc1507 |
+DEFAULTMULTIFLAGS := -m32
|
|
|
dc1507 |
+endif
|
|
|
dc1507 |
+endif
|
|
|
dc1507 |
+endif
|
|
|
dc1507 |
+endif
|
|
|
dc1507 |
+
|
|
|
dc1507 |
# exeext should not be used because it's the *host* exeext. We're building
|
|
|
dc1507 |
# a *target* library, aren't we?!? Likewise for CC. Still, provide bogus
|
|
|
dc1507 |
# definitions just in case something slips through the safety net provided
|
|
|
dc1507 |
# by recursive make invocations in gcc/ada/Makefile.in
|
|
|
dc1507 |
LIBADA_FLAGS_TO_PASS = \
|
|
|
dc1507 |
"MAKEOVERRIDES=" \
|
|
|
dc1507 |
- "LDFLAGS=$(LDFLAGS)" \
|
|
|
dc1507 |
+ "LDFLAGS=$(strip $(LDFLAGS) $(DEFAULTMULTIFLAGS))" \
|
|
|
dc1507 |
"LN_S=$(LN_S)" \
|
|
|
dc1507 |
"SHELL=$(SHELL)" \
|
|
|
dc1507 |
- "GNATLIBFLAGS=$(GNATLIBFLAGS) $(MULTIFLAGS)" \
|
|
|
dc1507 |
- "GNATLIBCFLAGS=$(GNATLIBCFLAGS) $(MULTIFLAGS)" \
|
|
|
dc1507 |
- "GNATLIBCFLAGS_FOR_C=$(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS)" \
|
|
|
dc1507 |
+ "GNATLIBFLAGS=$(strip $(GNATLIBFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS))" \
|
|
|
dc1507 |
+ "GNATLIBCFLAGS=$(strip $(GNATLIBCFLAGS) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS))" \
|
|
|
dc1507 |
+ "GNATLIBCFLAGS_FOR_C=$(strip $(GNATLIBCFLAGS_FOR_C) $(MULTIFLAGS) $(DEFAULTMULTIFLAGS))" \
|
|
|
dc1507 |
"TARGET_LIBGCC2_CFLAGS=$(TARGET_LIBGCC2_CFLAGS)" \
|
|
|
dc1507 |
"THREAD_KIND=$(THREAD_KIND)" \
|
|
|
dc1507 |
"TRACE=$(TRACE)" \
|
|
|
dc1507 |
@@ -91,7 +113,7 @@ LIBADA_FLAGS_TO_PASS = \
|
|
|
dc1507 |
"exeext=.exeext.should.not.be.used " \
|
|
|
dc1507 |
'CC=the.host.compiler.should.not.be.needed' \
|
|
|
dc1507 |
"GCC_FOR_TARGET=$(CC)" \
|
|
|
dc1507 |
- "CFLAGS=$(CFLAGS) $(WARN_CFLAGS)"
|
|
|
dc1507 |
+ "CFLAGS=$(strip $(CFLAGS) $(DEFAULTMULTIFLAGS) $(WARN_CFLAGS))"
|
|
|
dc1507 |
|
|
|
dc1507 |
# Rules to build gnatlib.
|
|
|
dc1507 |
.PHONY: gnatlib gnatlib-plain gnatlib-sjlj gnatlib-zcx gnatlib-shared oscons
|
|
|
dc1507 |
--- gcc/ada/make.adb 2008-11-07 23:00:32.000000000 +0100
|
|
|
dc1507 |
+++ gcc/ada/make.adb 2009-01-16 17:55:02.000000000 +0100
|
|
|
dc1507 |
@@ -8039,6 +8039,7 @@ package body Make is
|
|
|
dc1507 |
or else Argv (2 .. Argv'Last) = "pg"
|
|
|
dc1507 |
or else (Argv (2) = 'm' and then Argv'Last > 2)
|
|
|
dc1507 |
or else (Argv (2) = 'f' and then Argv'Last > 2)
|
|
|
dc1507 |
+ or else (Argv'Last >= 8 and then Argv (2 .. 8) = "-param=")
|
|
|
dc1507 |
then
|
|
|
dc1507 |
Add_Switch (Argv, Compiler, And_Save => And_Save);
|
|
|
dc1507 |
Add_Switch (Argv, Linker, And_Save => And_Save);
|