X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Fada%2Fgcc-interface%2FMakefile.in;h=f9e7edab3e16c068abff99b18d392bbcc77f4a02;hp=47bf9fd3e65fb9e552a1a5523164db32decff155;hb=176ff0f9a1016553978d6cf41770703e2ad90958;hpb=16827112ee60f6b6601da6d2d8494025632df4f6 diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index 47bf9fd3e65..f9e7edab3e1 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -1,5 +1,5 @@ # Makefile for GNU Ada Compiler (GNAT). -# Copyright (C) 1994-2010 Free Software Foundation, Inc. +# Copyright (C) 1994-2012 Free Software Foundation, Inc. #This file is part of GCC. @@ -105,22 +105,23 @@ TEXI2PDF = texi2pdf GNATBIND_FLAGS = -static -x ADA_CFLAGS = ADAFLAGS = -W -Wall -gnatpg -gnata -SOME_ADAFLAGS =-gnata FORCE_DEBUG_ADAFLAGS = -g -GNATLIBFLAGS = -gnatpg -nostdinc +NO_SIBLING_ADAFLAGS = -fno-optimize-sibling-calls +NO_REORDER_ADAFLAGS = -fno-toplevel-reorder +GNATLIBFLAGS = -W -Wall -gnatpg -nostdinc GNATLIBCFLAGS = -g -O2 +PICFLAG_FOR_TARGET = @PICFLAG_FOR_TARGET@ + # Pretend that _Unwind_GetIPInfo is available for the target by default. This # should be autodetected during the configuration of libada and passed down to # here, but we need something for --disable-libada and hope for the best. -GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \ - -DIN_RTS -DHAVE_GETIPINFO +GNATLIBCFLAGS_FOR_C = -W -Wall $(GNATLIBCFLAGS) \ + -fexceptions -DIN_RTS -DHAVE_GETIPINFO ALL_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(ADAFLAGS) -MOST_ADAFLAGS = $(CFLAGS) $(ADA_CFLAGS) $(SOME_ADAFLAGS) THREAD_KIND = native THREADSLIB = GMEM_LIB = MISCLIB = -SYMDEPS = $(LIBINTL_DEP) OUTPUT_OPTION = @OUTPUT_OPTION@ objext = .o @@ -174,11 +175,15 @@ top_builddir = ../.. LIBINTL = @LIBINTL@ LIBINTL_DEP = @LIBINTL_DEP@ +# Character encoding conversion library. +LIBICONV = @LIBICONV@ +LIBICONV_DEP = @LIBICONV_DEP@ + # Any system libraries needed just for GNAT. SYSLIBS = @GNAT_LIBEXC@ -# List of extra object files linked in with various programs. -EXTRA_GNATTOOLS_OBJS = ../../prefix.o ../../version.o +# List extra gnattools +EXTRA_GNATTOOLS = # List of target dependent sources, overridden below as necessary TARGET_ADA_SRCS = @@ -216,15 +221,15 @@ endif all.indirect: Makefile ../gnat1$(exeext) -# IN_GCC distinguishes between code compiled into GCC itself and other -# programs built during a bootstrap. +# IN_GCC is meant to distinguish between code compiled into GCC itself, i.e. +# for the host, and the rest. But we also use it for the tools (link.c) and +# even break the host/target wall by using it for the library (targext.c). # autoconf inserts -DCROSS_DIRECTORY_STRUCTURE if we are building a cross # compiler which does not use the native libraries and headers. INTERNAL_CFLAGS = @CROSS@ -DIN_GCC # This is the variable actually used when we compile. -LOOSE_CFLAGS = `echo $(CFLAGS) $(WARN2_CFLAGS)|sed -e 's/-pedantic//g' -e 's/-Wtraditional//g'` -ALL_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(LOOSE_CFLAGS) +ALL_CFLAGS = $(INTERNAL_CFLAGS) $(T_CFLAGS) $(CFLAGS) # Likewise. ALL_CPPFLAGS = $(CPPFLAGS) @@ -237,23 +242,49 @@ LIBIBERTY = ../../libiberty/libiberty.a # How to link with both our special library facilities # and the system's installed libraries. -LIBS = $(LIBINTL) $(LIBIBERTY) $(SYSLIBS) -LIBDEPS = $(LIBINTL_DEP) $(LIBIBERTY) +LIBS = $(LIBINTL) $(LIBICONV) $(LIBIBERTY) $(SYSLIBS) +LIBDEPS = $(LIBINTL_DEP) $(LIBICONV_DEP) $(LIBIBERTY) # Default is no TGT_LIB; one might be passed down or something TGT_LIB = -TOOLS_LIBS = $(EXTRA_GNATTOOLS_OBJS) targext.o link.o $(LIBGNAT) ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB) +TOOLS_LIBS = targext.o link.o ../../libcommon-target.a ../../libcommon.a \ + ../../../libcpp/libcpp.a $(LIBGNAT) $(LIBINTL) $(LIBICONV) \ + ../../../libiberty/libiberty.a $(SYSLIBS) $(TGT_LIB) + +# Convert the target variable into a space separated list of architecture, +# manufacturer, and operating system and assign each of those to its own +# variable. +host:=$(subst -, ,$(host_canonical)) +targ:=$(subst -, ,$(target)) +arch:=$(word 1,$(targ)) +ifeq ($(words $(targ)),2) + manu:= + osys:=$(word 2,$(targ)) +else + manu:=$(word 2,$(targ)) + osys:=$(word 3,$(targ)) +endif # Specify the directories to be searched for header files. # Both . and srcdir are used, in that order, # so that tm.h and config.h will be found in the compilation # subdirectory rather than in the source directory. -INCLUDES = -I- -I. -I.. -I$(srcdir)/ada -I$(srcdir) -I$(srcdir)/config \ - -I$(srcdir)/../include +INCLUDES = -I- -I. -I.. -I$(srcdir)/ada -I$(srcdir) -I$(srcdir)/../include ADA_INCLUDES = -I- -I. -I$(srcdir)/ada -INCLUDES_FOR_SUBDIR = -I. -I.. -I../.. -I$(fsrcdir)/ada \ - -I$(fsrcdir)/../include -I$(fsrcdir) +# Likewise, but valid for subdirectories of the current dir. +# FIXME: for VxWorks, we cannot add $(fsrcdir) because the regs.h file in +# that directory conflicts with a system header file. +ifneq ($(findstring vxworks,$(osys)),) + INCLUDES_FOR_SUBDIR = -iquote . -iquote .. -iquote ../.. \ + -iquote $(fsrcdir)/ada \ + -I$(fsrcdir)/../include +else + INCLUDES_FOR_SUBDIR = -iquote . -iquote .. -iquote ../.. \ + -iquote $(fsrcdir)/ada -iquote $(fsrcdir) \ + -I$(fsrcdir)/../include +endif + ADA_INCLUDES_FOR_SUBDIR = -I. -I$(fsrcdir)/ada # Avoid a lot of time thinking about remaking Makefile.in and *.def. @@ -296,37 +327,22 @@ GNATLINK_OBJS = gnatlink.o \ sdefault.o snames.o stylesw.o switch.o system.o table.o targparm.o tree_io.o \ types.o validsw.o widechar.o -GNATMAKE_OBJS = a-except.o ali.o ali-util.o s-casuti.o \ - alloc.o atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o\ +GNATMAKE_OBJS = a-except.o ali.o ali-util.o aspects.o s-casuti.o alloc.o \ + atree.o binderr.o butil.o casing.o csets.o debug.o elists.o einfo.o errout.o \ erroutc.o errutil.o err_vars.o fmap.o fname.o fname-uf.o fname-sf.o \ gnatmake.o gnatvsn.o hostparm.o interfac.o i-c.o i-cstrin.o krunch.o lib.o \ make.o makeusg.o makeutl.o mlib.o mlib-fil.o mlib-prj.o mlib-tgt.o \ mlib-tgt-specific.o mlib-utl.o namet.o nlists.o opt.o osint.o osint-m.o \ output.o prj.o prj-attr.o prj-attr-pm.o prj-com.o prj-dect.o prj-env.o \ - prj-conf.o prj-pp.o \ - prj-err.o prj-ext.o prj-nmsc.o prj-pars.o prj-part.o prj-proc.o prj-strt.o \ - prj-tree.o prj-util.o rident.o s-exctab.o s-secsta.o s-stalib.o s-stoele.o \ - scans.o scng.o sdefault.o sfn_scan.o s-purexc.o s-htable.o sinfo.o sinput.o \ - sinput-c.o sinput-p.o snames.o stand.o stringt.o styleg.o stylesw.o system.o \ - validsw.o switch.o switch-m.o table.o targparm.o tempdir.o tree_io.o types.o \ - uintp.o uname.o urealp.o usage.o widechar.o \ + prj-conf.o prj-pp.o prj-err.o prj-ext.o prj-nmsc.o prj-pars.o prj-part.o \ + prj-proc.o prj-strt.o prj-tree.o prj-util.o restrict.o rident.o s-exctab.o \ + s-secsta.o s-stalib.o s-stoele.o scans.o scng.o sdefault.o sfn_scan.o \ + s-purexc.o s-htable.o scil_ll.o sem_aux.o sinfo.o sinput.o sinput-c.o \ + sinput-p.o snames.o stand.o stringt.o styleg.o stylesw.o system.o validsw.o \ + switch.o switch-m.o table.o targparm.o tempdir.o tree_io.o types.o uintp.o \ + uname.o urealp.o usage.o widechar.o \ $(EXTRA_GNATMAKE_OBJS) -# Convert the target variable into a space separated list of architecture, -# manufacturer, and operating system and assign each of those to its own -# variable. - -host:=$(subst -, ,$(host_canonical)) -targ:=$(subst -, ,$(target)) -arch:=$(word 1,$(targ)) -ifeq ($(words $(targ)),2) - manu:= - osys:=$(word 2,$(targ)) -else - manu:=$(word 2,$(targ)) - osys:=$(word 3,$(targ)) -endif - # Make arch match the current multilib so that the RTS selection code # picks up the right files. For a given target this must be coherent # with MULTILIB_DIRNAMES defined in gcc/config/target/t-*. @@ -390,10 +406,10 @@ DUMMY_SOCKETS_TARGET_PAIRS = \ g-sothco.adb s-oscons-tmplt.s + +else +# GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust +# for running it from $(RTSDIR) +OSCONS_CC=`echo "$(GCC_FOR_TARGET)" \ + | sed -e 's^\./xgcc^../../xgcc^' -e 's^-B./^-B../../^'` +OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS) -E -C \ + -DTARGET=\"$(target)\" $(fsrcpfx)ada/s-oscons-tmplt.c > s-oscons-tmplt.i +OSCONS_EXTRACT=$(OSCONS_CC) $(GNATLIBCFLAGS) -S s-oscons-tmplt.i +endif + +./bldtools/oscons/xoscons: xoscons.adb xutil.ads xutil.adb + -$(MKDIR) ./bldtools/oscons + $(RM) $(addprefix ./bldtools/oscons/,$(notdir $^)) + $(CP) $^ ./bldtools/oscons + (cd ./bldtools/oscons ; gnatmake -q xoscons) + +$(RTSDIR)/s-oscons.ads: ../stamp-gnatlib1-$(RTSDIR) s-oscons-tmplt.c gsocket.h ./bldtools/oscons/xoscons + $(RM) $(RTSDIR)/s-oscons-tmplt.i $(RTSDIR)/s-oscons-tmplt.s + (cd $(RTSDIR) ; \ + $(OSCONS_CPP) ; \ + $(OSCONS_EXTRACT) ; \ + ../bldtools/oscons/xoscons) + # Don't use semicolon separated shell commands that involve list expansions. # The semicolon triggers a call to DCL on VMS and DCL can't handle command # line lengths in excess of 256 characters. # Example: cd $(RTSDIR); ar rc libfoo.a $(LONG_LIST_OF_OBJS) # is guaranteed to overflow the buffer. -gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) +gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-oscons.ads $(MAKE) -C $(RTSDIR) \ CC="`echo \"$(GCC_FOR_TARGET)\" \ | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \ @@ -2471,9 +2584,6 @@ gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnarl$(arext) \ $(addprefix $(RTSDIR)/,$(GNATRTL_TASKING_OBJS)) $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnarl$(arext) - $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgnala$(arext) \ - $(addprefix $(RTSDIR)/,$(GNATRTL_LINEARALGEBRA_OBJS)) - $(RANLIB_FOR_TARGET) $(RTSDIR)/libgnala$(arext) ifeq ($(GMEM_LIB),gmemlib) $(AR_FOR_TARGET) $(AR_FLAGS) $(RTSDIR)/libgmem$(arext) \ $(RTSDIR)/memtrack.o @@ -2486,20 +2596,22 @@ gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) gnatlib-shared-default: $(MAKE) $(FLAGS_TO_PASS) \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \ - GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \ - GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \ + GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \ + GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET)" \ MULTISUBDIR="$(MULTISUBDIR)" \ THREAD_KIND="$(THREAD_KIND)" \ gnatlib $(RM) $(RTSDIR)/libgna*$(soext) - cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \ - $(TARGET_LIBGCC2_CFLAGS) \ + cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \ + | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared $(GNATLIBCFLAGS) \ + $(PICFLAG_FOR_TARGET) \ -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(MISCLIB) -lm - cd $(RTSDIR); ../../xgcc -B../../ -shared $(GNATLIBCFLAGS) \ - $(TARGET_LIBGCC2_CFLAGS) \ + cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \ + | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared $(GNATLIBCFLAGS) \ + $(PICFLAG_FOR_TARGET) \ -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(GNATRTL_TASKING_OBJS) \ $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ @@ -2531,8 +2643,9 @@ gnatlib-shared-dual: gnatlib-shared-dual-win32: $(MAKE) $(FLAGS_TO_PASS) \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \ - GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \ + GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \ + PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" \ MULTISUBDIR="$(MULTISUBDIR)" \ THREAD_KIND="$(THREAD_KIND)" \ gnatlib-shared-win32 @@ -2554,17 +2667,21 @@ gnatlib-shared-dual-win32: gnatlib-shared-win32: $(MAKE) $(FLAGS_TO_PASS) \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \ - GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \ - GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \ + GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \ + GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET)" \ MULTISUBDIR="$(MULTISUBDIR)" \ THREAD_KIND="$(THREAD_KIND)" \ gnatlib $(RM) $(RTSDIR)/libgna*$(soext) - cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \ + cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \ + | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared -shared-libgcc \ + $(PICFLAG_FOR_TARGET) \ -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ $(SO_OPTS)libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) $(MISCLIB) - cd $(RTSDIR); ../../xgcc -B../../ -shared $(TARGET_LIBGCC2_CFLAGS) \ + cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \ + | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared -shared-libgcc \ + $(PICFLAG_FOR_TARGET) \ -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(GNATRTL_TASKING_OBJS) \ $(SO_OPTS)libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ @@ -2573,19 +2690,21 @@ gnatlib-shared-win32: gnatlib-shared-darwin: $(MAKE) $(FLAGS_TO_PASS) \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \ - GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS)" \ - GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) -fno-common" \ + GNATLIBCFLAGS="$(GNATLIBCFLAGS) $(PICFLAG_FOR_TARGET)" \ + GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C) $(PICFLAG_FOR_TARGET) -fno-common" \ MULTISUBDIR="$(MULTISUBDIR)" \ THREAD_KIND="$(THREAD_KIND)" \ gnatlib $(RM) $(RTSDIR)/libgnat$(soext) $(RTSDIR)/libgnarl$(soext) - cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \ + cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \ + | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -dynamiclib $(PICFLAG_FOR_TARGET) \ -o libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(GNATRTL_NONTASKING_OBJS) $(LIBGNAT_OBJS) \ $(SO_OPTS) \ -Wl,-install_name,@rpath/libgnat$(hyphen)$(LIBRARY_VERSION)$(soext) \ - $(MISCLIB) -lm - cd $(RTSDIR); ../../xgcc -B../../ -dynamiclib $(TARGET_LIBGCC2_CFLAGS) \ + $(MISCLIB) + cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \ + | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -dynamiclib $(PICFLAG_FOR_TARGET) \ -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(GNATRTL_TASKING_OBJS) \ $(SO_OPTS) \ @@ -2634,24 +2753,34 @@ gnatlib-shared: GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \ MULTISUBDIR="$(MULTISUBDIR)" \ THREAD_KIND="$(THREAD_KIND)" \ - TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" \ + PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" \ $(GNATLIB_SHARED) +# When building a SJLJ runtime for VxWorks, in addition to forcing +# ZCX_By_default to True, we need to ensure that -crtbe linker options +# is not passed. Otherwise we will end with weak symbols on +# __register_frame_info and __deregister_frame_info. The VxWorks 5.x +# will issue an error on weak symbols. gnatlib-sjlj: - $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" ../stamp-gnatlib1-$(RTSDIR) + $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="" \ + THREAD_KIND="$(THREAD_KIND)" ../stamp-gnatlib1-$(RTSDIR) sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := False;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads - $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads + cat $(RTSDIR)/s.ads | grep -v "Linker_Options.*-crtbe" > $(RTSDIR)/s2.ads + $(RM) $(RTSDIR)/s.ads + $(MV) $(RTSDIR)/s2.ads $(RTSDIR)/system.ads $(MAKE) $(FLAGS_TO_PASS) \ EH_MECHANISM="" \ GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \ + FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \ MULTISUBDIR="$(MULTISUBDIR)" \ THREAD_KIND="$(THREAD_KIND)" \ - TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib + PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" gnatlib gnatlib-zcx: - $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" ../stamp-gnatlib1-$(RTSDIR) + $(MAKE) $(FLAGS_TO_PASS) EH_MECHANISM="-gcc" \ + THREAD_KIND="$(THREAD_KIND)" ../stamp-gnatlib1-$(RTSDIR) sed -e 's/ZCX_By_Default.*/ZCX_By_Default : constant Boolean := True;/' $(RTSDIR)/system.ads > $(RTSDIR)/s.ads $(MV) $(RTSDIR)/s.ads $(RTSDIR)/system.ads $(MAKE) $(FLAGS_TO_PASS) \ @@ -2659,13 +2788,10 @@ gnatlib-zcx: GNATLIBFLAGS="$(GNATLIBFLAGS)" \ GNATLIBCFLAGS="$(GNATLIBCFLAGS)" \ GNATLIBCFLAGS_FOR_C="$(GNATLIBCFLAGS_FOR_C)" \ + FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \ MULTISUBDIR="$(MULTISUBDIR)" \ THREAD_KIND="$(THREAD_KIND)" \ - TARGET_LIBGCC2_CFLAGS="$(TARGET_LIBGCC2_CFLAGS)" gnatlib - -# .s files for cross-building -gnat-cross: force - make $(GNAT1_ADA_OBJS) CC="gcc -B../stage1/" CFLAGS="-S -gnatp" + PICFLAG_FOR_TARGET="$(PICFLAG_FOR_TARGET)" gnatlib # Compiling object files from source files. @@ -2675,33 +2801,32 @@ gnat-cross: force # because all that file does, when not compiling with GCC, # is include the system varargs.h. -b_gnatl.c : $(GNATLINK_OBJS) - $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatl.c gnatlink.ali -b_gnatl.o : b_gnatl.c +b_gnatl.adb : $(GNATLINK_OBJS) + $(GNATBIND) $(ADA_INCLUDES) -o b_gnatl.adb gnatlink.ali -b_gnatm.c : $(GNATMAKE_OBJS) - $(GNATBIND) -C $(ADA_INCLUDES) -o b_gnatm.c gnatmake.ali -b_gnatm.o : b_gnatm.c +b_gnatl.o : b_gnatl.adb + $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) -gnatws -gnatyN \ + $< $(OUTPUT_OPTION) + +b_gnatm.adb : $(GNATMAKE_OBJS) + $(GNATBIND) $(ADA_INCLUDES) -o b_gnatm.adb gnatmake.ali + +b_gnatm.o : b_gnatm.adb + $(CC) -c $(ALL_ADAFLAGS) $(ADA_INCLUDES) -gnatws -gnatyN \ + $< $(OUTPUT_OPTION) ADA_INCLUDE_DIR = $(libsubdir)/adainclude ADA_RTL_OBJ_DIR = $(libsubdir)/adalib +# Special flags + # force no sibling call optimization on s-traceb.o so the number of stack # frames to be skipped when computing a call chain is not modified by -# optimization. However we can do that only when building the runtime -# (not the compiler) because the -fno-optimize-sibling-calls option exists -# only in GCC 3 and above. - -ifneq (,$(findstring xgcc,$(CC))) -NO_SIBLING_ADAFLAGS=-fno-optimize-sibling-calls -else -NO_SIBLING_ADAFLAGS= -endif +# optimization. -s-traceb.o : s-traceb.adb +s-traceb.o : s-traceb.adb s-traceb.ads $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) \ - $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) \ - $< $(OUTPUT_OPTION) + $(NO_SIBLING_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION) # force debugging information on s-tasdeb.o so that it is always # possible to set conditional breakpoints on tasks. @@ -2710,17 +2835,16 @@ s-tasdeb.o : s-tasdeb.adb s-tasdeb.ads $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \ $< $(OUTPUT_OPTION) -# force no function reordering on a-except.o because of the exclusion bounds -# mechanism (see the source file for more detailed information). However we -# can do that only when building the runtime (not the compiler) because the -# -fno-toplevel-reorder option exists only in GCC 4.2 and above. +# force debugging information on s-vaflop.o so that it is always +# possible to call the VAX float debug print routines. +# force at least -O so that the inline assembly works. -ifneq (,$(findstring xgcc,$(CC))) -NO_REORDER_ADAFLAGS=-fno-toplevel-reorder -else -NO_REORDER_ADAFLAGS= -endif +s-vaflop.o : s-vaflop.adb s-vaflop.ads + $(CC) -c -O $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \ + $< $(OUTPUT_OPTION) +# force no function reordering on a-except.o because of the exclusion bounds +# mechanism (see the source file for more detailed information). # force debugging information on a-except.o so that it is always # possible to set conditional breakpoints on exceptions. # use -O1 otherwise gdb isn't able to get a full backtrace on mips targets. @@ -2729,21 +2853,34 @@ a-except.o : a-except.adb a-except.ads $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O1 -fno-inline \ $(NO_REORDER_ADAFLAGS) $(ADA_INCLUDES) $< $(OUTPUT_OPTION) -# compile s-except.o without optimization and with debug info to let the +# compile s-excdeb.o without optimization and with debug info to let the # debugger set breakpoints and inspect subprogram parameters on exception # related events. -s-except.o : s-except.adb s-except.ads +s-excdeb.o : s-excdeb.adb s-excdeb.ads s-except.ads $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O0 $(ADA_INCLUDES) \ $< $(OUTPUT_OPTION) # force debugging information on s-assert.o so that it is always # possible to set breakpoint on assert failures. -s-assert.o : s-assert.adb s-assert.ads a-except.ads - $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) -O2 $(ADA_INCLUDES) \ +s-assert.o : s-assert.adb s-assert.ads + $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \ $< $(OUTPUT_OPTION) +# force debugging information on a-tags.o so that the debugger can find +# the description of Ada.Tags.Type_Specific_Data. + +a-tags.o : a-tags.adb a-tags.ads + $(CC) -c $(ALL_ADAFLAGS) $(FORCE_DEBUG_ADAFLAGS) $(ADA_INCLUDES) \ + $< $(OUTPUT_OPTION) + +# need to keep the frame pointer in this file to pop the stack properly on +# some targets. +tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c + $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \ + $(INCLUDES) -fno-omit-frame-pointer $< $(OUTPUT_OPTION) + adadecode.o : adadecode.c adadecode.h aux-io.o : aux-io.c argv.o : argv.c @@ -2753,15 +2890,20 @@ errno.o : errno.c exit.o : adaint.h exit.c expect.o : expect.c final.o : final.c -gmem.o : gmem.c -link.o : link.c +locales.o : locales.c mkdir.o : mkdir.c socket.o : socket.c gsocket.h sysdep.o : sysdep.c -raise-gcc.o : raise-gcc.c raise.h raise.o : raise.c raise.h +sigtramp-ppcvxw.o : sigtramp-ppcvxw.c sigtramp.h +terminals.o : terminals.c vx_stack_info.o : vx_stack_info.c +raise-gcc.o : raise-gcc.c raise.h + $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \ + -iquote $(srcdir) -iquote $(srcdir)/../libgcc \ + $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) + cio.o : cio.c $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \ $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) @@ -2774,35 +2916,19 @@ initialize.o : initialize.c raise.h $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \ $(ALL_CPPFLAGS) $(INCLUDES) $< $(OUTPUT_OPTION) -targext.o : targext.c +link.o : link.c $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \ $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \ $< $(OUTPUT_OPTION) -# Need to keep the frame pointer in this file to pop the stack properly on -# some targets. -tracebak.o : tracebak.c tb-alvms.c tb-alvxw.c tb-gcc.c - $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) $(ALL_CPPFLAGS) \ - $(INCLUDES) -fno-omit-frame-pointer $< $(OUTPUT_OPTION) +targext.o : targext.c + $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ADA_CFLAGS) \ + -iquote $(srcdir) \ + $(ALL_CPPFLAGS) $(INCLUDES_FOR_SUBDIR) \ + $< $(OUTPUT_OPTION) # In GNU Make, ignore whether `stage*' exists. .PHONY: stage1 stage2 stage3 stage4 clean realclean TAGS bootstrap .PHONY: risky-stage1 risky-stage2 risky-stage3 risky-stage4 force: - -# Gnatlbr, Vms_help, and Gnat.hlp are only used on VMS - -../../gnatlbr$(exeext): ../../prefix.o - $(GNATMAKE) -c $(ADA_INCLUDES) gnatlbr --GCC="$(CC) $(ALL_ADAFLAGS)" - $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) gnatlbr - $(GNATLINK) -v gnatlbr -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - -../../vms_help$(exeext): - $(GNATMAKE) -c $(ADA_INCLUDES) vms_help --GCC="$(CC) $(ALL_ADAFLAGS)" - $(GNATBIND) $(ADA_INCLUDES) $(GNATBIND_FLAGS) vms_help - $(GNATLINK) -v vms_help -o $@ --GCC="$(GCC_LINK)" $(TOOLS_LIBS) - -../../gnat.hlp: ../../vms_help$(exeext) - ../../vms_help$(exeext) $(fsrcdir)/ada/gnat.help_in \ - $(fsrcdir)/ada/vms_data.ads ../../gnat.hlp