public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Alexandre Oliva <aoliva@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/aoliva/heads/testme)] Add TFLAGS to uses of GCC_FOR_TARGET in gnatlib Date: Thu, 19 May 2022 09:47:11 +0000 (GMT) [thread overview] Message-ID: <20220519094711.F36DF385141D@sourceware.org> (raw) https://gcc.gnu.org/g:a9e10c35c8a0780b9aff3d83042523302db510c0 commit a9e10c35c8a0780b9aff3d83042523302db510c0 Author: Alexandre Oliva <oliva@adacore.com> Date: Thu May 19 06:45:58 2022 -0300 Add TFLAGS to uses of GCC_FOR_TARGET in gnatlib TFLAGS is expected to affect all target libs, but we miss it in gnatlib. Fix that. for gcc/ada/ChangeLog * gcc-interface/Makefile (OSCONS_CC): Rename to... (GCC_ADA_FOR_TARGET): ... this. Adjust users. Add TFLAGS. (gnatlib): Pass it down as CC. (gnatlib-shared-default): Likewise. (gnatlib-shared-win32, gnatlib-shared-darwin): Likewise. Diff: --- gcc/ada/gcc-interface/Makefile.in | 33 +++++++++++++-------------------- 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index 1e9801a8b96..88c9c8a87ac 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -588,9 +588,10 @@ install-gnatlib: ../stamp-gnatlib-$(RTSDIR) install-gcc-specs touch ../stamp-gnatlib1-$(RTSDIR) # GCC_FOR_TARGET has paths relative to the gcc directory, so we need to adjust -# for running it from ada/rts +# for running it from ada/rts. +# Also add TFLAGS, that we'd otherwise drop. -OSCONS_CC=$(subst ./xgcc,../../xgcc,$(subst -B./, -B../../,$(GCC_FOR_TARGET))) +GCC_ADA_FOR_TARGET=$(subst ./xgcc,../../xgcc,$(subst -B./, -B../../,$(GCC_FOR_TARGET))) $(TFLAGS) # The main ada source directory must be on the include path for #include "..." # because s-oscons-tmplt.c requires adaint.h, gsocket.h, and any file included @@ -598,9 +599,9 @@ OSCONS_CC=$(subst ./xgcc,../../xgcc,$(subst -B./, -B../../,$(GCC_FOR_TARGET))) # ada/types.h does not conflict with a same-named system header (VxWorks # has a <types.h> header). -OSCONS_CPP=$(OSCONS_CC) $(GNATLIBCFLAGS_FOR_C) -E -C \ +OSCONS_CPP=$(GCC_ADA_FOR_TARGET) $(GNATLIBCFLAGS_FOR_C) -E -C \ -DTARGET=\"$(target_noncanonical)\" -iquote $(fsrcpfx)ada $(fsrcpfx)ada/s-oscons-tmplt.c > s-oscons-tmplt.i -OSCONS_EXTRACT=$(OSCONS_CC) $(GNATLIBCFLAGS_FOR_C) -S s-oscons-tmplt.i +OSCONS_EXTRACT=$(GCC_ADA_FOR_TARGET) $(GNATLIBCFLAGS_FOR_C) -S s-oscons-tmplt.i # Note: if you need to build with a non-GNU compiler, you could adapt the # following definitions (written for VMS DEC-C) @@ -629,8 +630,7 @@ gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-osc test -f $(RTSDIR)/s-oscons.ads || exit 1 # C files $(MAKE) -C $(RTSDIR) \ - CC="`echo \"$(GCC_FOR_TARGET)\" \ - | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \ + CC="$(GCC_ADA_FOR_TARGET)" \ INCLUDES="$(INCLUDES_FOR_SUBDIR) -I./../.." \ CFLAGS="$(GNATLIBCFLAGS_FOR_C)" \ FORCE_DEBUG_ADAFLAGS="$(FORCE_DEBUG_ADAFLAGS)" \ @@ -638,8 +638,7 @@ gnatlib: ../stamp-gnatlib1-$(RTSDIR) ../stamp-gnatlib2-$(RTSDIR) $(RTSDIR)/s-osc -f ../Makefile $(LIBGNAT_OBJS) $(EXTRA_ADALIB_OBJS) # Ada files $(MAKE) -C $(RTSDIR) \ - CC="`echo \"$(GCC_FOR_TARGET)\" \ - | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'`" \ + CC="$(GCC_ADA_FOR_TARGET)" \ ADA_INCLUDES="" \ CFLAGS="$(GNATLIBCFLAGS)" \ ADAFLAGS="$(GNATLIBFLAGS)" \ @@ -672,15 +671,13 @@ gnatlib-shared-default: LN_S="$(LN_S)" \ gnatlib $(RM) $(RTSDIR)/libgna*$(soext) - cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \ - | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared $(GNATLIBCFLAGS) \ + cd $(RTSDIR); $(GCC_ADA_FOR_TARGET) -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); `echo "$(GCC_FOR_TARGET)" \ - | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared $(GNATLIBCFLAGS) \ + cd $(RTSDIR); $(GCC_ADA_FOR_TARGET) -shared $(GNATLIBCFLAGS) \ $(PICFLAG_FOR_TARGET) \ -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(GNATRTL_TASKING_OBJS) \ @@ -764,14 +761,12 @@ gnatlib-shared-win32: $(RM) $(RTSDIR)/libgna*$(soext) $(CP) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnat_pic$(arext) $(CP) $(RTSDIR)/libgnarl$(arext) $(RTSDIR)/libgnarl_pic$(arext) - cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \ - | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared -shared-libgcc \ + cd $(RTSDIR); $(GCC_ADA_FOR_TARGET) -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); `echo "$(GCC_FOR_TARGET)" \ - | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -shared -shared-libgcc \ + cd $(RTSDIR); $(GCC_ADA_FOR_TARGET) -shared -shared-libgcc \ $(PICFLAG_FOR_TARGET) \ -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(GNATRTL_TASKING_OBJS) \ @@ -790,15 +785,13 @@ gnatlib-shared-darwin: $(RM) $(RTSDIR)/libgnat$(soext) $(RTSDIR)/libgnarl$(soext) $(CP) $(RTSDIR)/libgnat$(arext) $(RTSDIR)/libgnat_pic$(arext) $(CP) $(RTSDIR)/libgnarl$(arext) $(RTSDIR)/libgnarl_pic$(arext) - cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \ - | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -dynamiclib $(PICFLAG_FOR_TARGET) \ + cd $(RTSDIR); $(GCC_ADA_FOR_TARGET) -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) - cd $(RTSDIR); `echo "$(GCC_FOR_TARGET)" \ - | sed -e 's,\./xgcc,../../xgcc,' -e 's,-B\./,-B../../,'` -dynamiclib $(PICFLAG_FOR_TARGET) \ + cd $(RTSDIR); $(GCC_ADA_FOR_TARGET) -dynamiclib $(PICFLAG_FOR_TARGET) \ -o libgnarl$(hyphen)$(LIBRARY_VERSION)$(soext) \ $(GNATRTL_TASKING_OBJS) \ $(SO_OPTS) \
next reply other threads:[~2022-05-19 9:47 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-19 9:47 Alexandre Oliva [this message] 2022-05-19 10:15 Alexandre Oliva 2022-05-19 10:36 Alexandre Oliva
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220519094711.F36DF385141D@sourceware.org \ --to=aoliva@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).