* adjust libgcc build support for VxWorks to VxWorks 7
@ 2017-06-27 12:17 Olivier Hainque
2017-06-27 13:25 ` Ian Lance Taylor via gcc-patches
0 siblings, 1 reply; 3+ messages in thread
From: Olivier Hainque @ 2017-06-27 12:17 UTC (permalink / raw)
To: GCC Patches
Cc: Olivier Hainque, Douglas B Rupp, Jerome Lambourg, Nathan Sidwell
[-- Attachment #1: Type: text/plain, Size: 1781 bytes --]
Hello,
This replicates for VxWorks 7 the "trick" used to let libgcc build for VxWorks
in absence of fixincludes, namely the last piece libgcc/config/t-vxworks:
...
# This ensures that the correct target headers are used; some
# VxWorks system headers have names that collide with GCC's
# internal (host) headers, e.g. regs.h.
LIBGCC2_INCLUDES = -nostdinc \
`case "/$(MULTIDIR)" in \
*/mrtp*) echo -I$(WIND_USR)/h -I$(WIND_USR)/h/wrn/coreip ;; \
*) echo -I$(WIND_BASE)/target/h -I$(WIND_BASE)/target/h/wrn/coreip ;; \
esac`
As an alternative resolution, fixincludes can help with this problem and we
have "hacks" for this purpose. They aren't quite complete, however, and getting
fixincludes to work properly gets significantly more difficult with VxWorks 7
because sets of include subdirs need to be looked at. The issue raised on
https://gcc.gnu.org/ml/gcc/2017-06/msg00003.html adds on top, and overall, the
fewer dependencies we have on fixincludes for VxWorks, the better.
The attached patch reinstates the existing trick for VxWorks 7, providing an
alternate t-vxworks7 file adjusting the set of system header file directories
to consider. The rest is copied verbatim. It's too small to warrant sharing
and this will facilitate vx7 specific adjustments to the other parameters in
the future if need be.
As for the other patches of the vx7 series, this was included in a preliminary
gcc-7 based port in-house which passes almost 100% of the ACATS tests for Ada,
and lets the toolchain+libgcc build in absence of fixincludes on mainline.
With Kind Regards,
Olivier
2017-06-27 Olivier Hainque <hainque@adacore.com>
libgcc/
* config/t-vxworks7: New file.
* config.host (*-*-vxworks7): Use it.
[-- Attachment #2: 0005-adjust-libgcc-build-support-for-VxWorks-to-VxWorks-7.patch --]
[-- Type: application/octet-stream, Size: 1078 bytes --]
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -312,6 +312,9 @@ case ${host} in
tmake_file="vms/t-vms"
extra_parts="crt0.o crtbegin.o crtbeginS.o crtend.o crtendS.o"
;;
+*-*-vxworks7)
+ tmake_file=t-vxworks7
+ ;;
*-*-vxworks*)
tmake_file=t-vxworks
;;
diff --git a/libgcc/config/t-vxworks7 b/libgcc/config/t-vxworks7
new file mode 100644
index 0000000..77591cd
--- /dev/null
+++ b/libgcc/config/t-vxworks7
@@ -0,0 +1,16 @@
+# Don't build libgcc.a with debug info
+LIBGCC2_DEBUG_CFLAGS =
+
+# Extra libgcc2 modules used by gthr-vxworks.h functions
+LIB2ADDEH += $(srcdir)/config/vxlib.c $(srcdir)/config/vxlib-tls.c
+
+# This ensures that the correct target headers are used; some
+# VxWorks system headers have names that collide with GCC's
+# internal (host) headers, e.g. regs.h.
+LIBGCC2_INCLUDES = -nostdinc \
+ -I$(VSB_DIR)/h -I$(VSB_DIR)/share/h \
+ `case "/$(MULTIDIR)" in \
+ */mrtp*) echo -I$(VSB_DIR)/usr/h/public -I$(VSB_DIR)/usr/h ;; \
+ *) echo -I$(VSB_DIR)/krnl/h/system -I$(VSB_DIR)/krnl/h/public ;; \
+ esac`
+
--
1.7.10.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: adjust libgcc build support for VxWorks to VxWorks 7
2017-06-27 12:17 adjust libgcc build support for VxWorks to VxWorks 7 Olivier Hainque
@ 2017-06-27 13:25 ` Ian Lance Taylor via gcc-patches
2017-06-27 13:31 ` Olivier Hainque
0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor via gcc-patches @ 2017-06-27 13:25 UTC (permalink / raw)
To: Olivier Hainque
Cc: GCC Patches, Douglas B Rupp, Jerome Lambourg, Nathan Sidwell
On Tue, Jun 27, 2017 at 5:17 AM, Olivier Hainque <hainque@adacore.com> wrote:
>
> 2017-06-27 Olivier Hainque <hainque@adacore.com>
>
> libgcc/
> * config/t-vxworks7: New file.
> * config.host (*-*-vxworks7): Use it.
This is OK.
Thanks.
Ian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: adjust libgcc build support for VxWorks to VxWorks 7
2017-06-27 13:25 ` Ian Lance Taylor via gcc-patches
@ 2017-06-27 13:31 ` Olivier Hainque
0 siblings, 0 replies; 3+ messages in thread
From: Olivier Hainque @ 2017-06-27 13:31 UTC (permalink / raw)
To: Ian Lance Taylor
Cc: Olivier Hainque, GCC Patches, Douglas B Rupp, Jerome Lambourg,
Nathan Sidwell
> On Jun 27, 2017, at 15:25 , Ian Lance Taylor <iant@google.com> wrote:
>
> On Tue, Jun 27, 2017 at 5:17 AM, Olivier Hainque <hainque@adacore.com> wrote:
>>
>> 2017-06-27 Olivier Hainque <hainque@adacore.com>
>>
>> libgcc/
>> * config/t-vxworks7: New file.
>> * config.host (*-*-vxworks7): Use it.
>
> This is OK.
Great, thanks for your super prompt feedback Ian!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-27 13:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-27 12:17 adjust libgcc build support for VxWorks to VxWorks 7 Olivier Hainque
2017-06-27 13:25 ` Ian Lance Taylor via gcc-patches
2017-06-27 13:31 ` Olivier Hainque
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).