diff options
author | Olivier Hainque <hainque@adacore.com> | 2021-12-03 17:50:56 +0000 |
---|---|---|
committer | Olivier Hainque <hainque@adacore.com> | 2022-10-11 07:31:07 +0000 |
commit | 0ecd0f1cc6f8f3ba818946a42b22c2ab61f46825 (patch) | |
tree | ad111c740ba0474c72fe2b99df1ac034a995ece0 /libgcc | |
parent | 46325c16324b06fa1b3ea7f8cb05f2109ed66cf6 (diff) | |
download | gcc-0ecd0f1cc6f8f3ba818946a42b22c2ab61f46825.tar.gz |
Generic configury support for shared libs on VxWorks
This change adds the configury bits to activate the build of
shared libs on VxWorks ports configured with --enable-shared,
for libraries variants where this is generally supported (rtp,
code model !large - currently not compatible with -fPIC).
Set lt_cv_deplibs_check_method in libtool.m4, so the build of
libraries know how to establish dependencies. This is useful in
configurations such as aarch64 where proper support of LSE relies
on accurate dependency information between libstdc++ and libgcc_s
to begin with.
Regenerate configure scripts to reflect libtool.m4 change.
2022-10-09 Olivier Hainque <hainque@adacore.com>
* libtool.m4 (*vxworks*): When enable_shared, set dynamic_linker
and friends for rtp !large. Assume the linker has the required
abilities and set lt_cv_deplibs_check_method.
gcc/
* config.gcc (*vxworks*): Add t-slibgcc fragment
if enable_shared.
libgcc/
* config.host (*vxworks*): When enable_shared, add
libgcc and crtstuff "shared" fragments for rtp except
large code model.
(aarch64*-wrs-vxworks7*): Remove t-slibgcc-libgcc from
the list of fragments.
2022-10-09 Olivier Hainque <hainque@adacore.com>
gcc/
* configure: Regenerate.
libatomic/
* configure: Regenerate.
libbacktrace/
* configure: Regenerate.
libcc1/
* configure: Regenerate.
libffi/
* configure: Regenerate.
libgfortran/
* configure: Regenerate.
libgomp/
* configure: Regenerate.
libitm/
* configure: Regenerate.
libobjc/
* configure: Regenerate.
liboffloadmic/
* configure: Regenerate.
liboffloadmic/
* plugin/configure: Regenerate.
libphobos/
* configure: Regenerate.
libquadmath/
* configure: Regenerate.
libsanitizer/
* configure: Regenerate.
libssp/
* configure: Regenerate.
libstdc++-v3/
* configure: Regenerate.
libvtv/
* configure: Regenerate.
lto-plugin/
* configure: Regenerate.
zlib/
* configure: Regenerate.
Diffstat (limited to 'libgcc')
-rw-r--r-- | libgcc/config.host | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/libgcc/config.host b/libgcc/config.host index 9dcc2538dc8..0fbf9a34f17 100644 --- a/libgcc/config.host +++ b/libgcc/config.host @@ -410,7 +410,7 @@ aarch64*-*-vxworks7*) extra_parts="$extra_parts crtfastmath.o" md_unwind_header=aarch64/aarch64-unwind.h tmake_file="${tmake_file} ${cpu_type}/t-aarch64" - tmake_file="${tmake_file} ${cpu_type}/t-lse t-slibgcc-libgcc" + tmake_file="${tmake_file} ${cpu_type}/t-lse" tmake_file="${tmake_file} ${cpu_type}/t-softfp t-softfp t-crtfm" tmake_file="${tmake_file} t-dfprules" ;; @@ -1549,6 +1549,35 @@ aarch64*-*-*) ;; esac +# Setup to build a shared libgcc for VxWorks when that was requested, +# for library variants that support it (rtp only, code model not large). +# + +case ${host} in +*vxworks*) + case ${with_multisubdir}-${enable_shared} in + *large*) + ;; + *mrtp*-yes) + tmake_file="${tmake_file} t-libgcc-pic" + + # Arrange to set a soname on libgcc_s so DT_NEEDED entries + # for it refer to that alone. This ensures absence of path + # components which would be incorrect as the runtime loader + # on target has no visibility over the host filesystem. + tmake_file="${tmake_file} t-slibgcc-gld-nover" + tmake_file="${tmake_file} t-slibgcc" + + # t-slibgcc-libgcc is needed on at least aarch64 (for + # lse) and at most harmless on other targets. + tmake_file="${tmake_file} t-slibgcc-libgcc" + + tmake_file="${tmake_file} t-crtstuff-pic t-vxcrtstuffS" + ;; + esac + ;; +esac + # The vxworks threads implementation relies on a few extra sources, # which we arrange to add after everything else: |