diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2024-05-07 13:14:05 +0200 |
---|---|---|
committer | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2024-05-07 13:14:05 +0200 |
commit | 35b05a02de1e8aee7c754a20f50736977c71caca (patch) | |
tree | f095ce3f6348aa143f756f5028e73c4a7142c709 /contrib | |
parent | b09c2e9560648b0cf993c2ca9ad972c34e6bddfa (diff) | |
download | gcc-35b05a02de1e8aee7c754a20f50736977c71caca.zip gcc-35b05a02de1e8aee7c754a20f50736977c71caca.tar.gz gcc-35b05a02de1e8aee7c754a20f50736977c71caca.tar.bz2 |
build: Derive object names in make_sunver.pl
The recent move of libgfortran object files to subdirs and the resulting
breakage of libgfortran.so symbol exports demonstrated how fragile
deriving object and archive names from their libtool counterparts in the
Makefiles is. Therefore, this patch moves that step into
make_sunver.pl, considerably simplifying the Makefile rules to create
the version scripts.
Bootstrapped without regressions on i386-pc-solaris2.11 and
sparc-sun-solaris2.11, verifying that the version scripts are identical
except for the input filenames.
2024-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
contrib:
* make_sunver.pl: Use File::Basename;
Skip -lLIB args.
Convert libtool object/archive names to underlying
objects/archives.
libatomic:
* Makefile.am [LIBAT_BUILD_VERSIONED_SHLIB_SUN]
(libatomic.map-sun): Pass $(libatomic_la_OBJECTS),
$(libatomic_la_LIBADD) to make_sunver.pl unmodified.
* Makefile.in: Regenerate.
libffi:
* Makefile.am [LIBFFI_BUILD_VERSIONED_SHLIB_SUN] (libffi.map-sun):
Pass $(libffi_la_OBJECTS), $(libffi_la_LIBADD) to make_sunver.pl
unmodified.
* Makefile.in: Regenerate.
libgfortran:
* Makefile.am [LIBGFOR_USE_SYMVER_SUN} (gfortran.ver-sun): Pass
$(libgfortran_la_OBJECTS), $(libgfortran_la_LIBADD) to
make_sunver.pl unmodified.
* Makefile.in: Regenerate.
libgomp:
* Makefile.am [LIBGOMP_BUILD_VERSIONED_SHLIB_SUN]
(libgomp.ver-sun): Pass $(libgomp_la_OBJECTS),
$(libgomp_la_LIBADD) to make_sunver.pl unmodified.
* Makefile.in: Regenerate.
libitm:
* Makefile.am [LIBITM_BUILD_VERSIONED_SHLIB_SUN] (libitm.map-sun):
Pass $(libitm_la_OBJECTS), $(libitm_la_LIBADD) to make_sunver.pl
unmodified.
* Makefile.in: Regenerate.
libquadmath:
* Makefile.am [LIBQUAD_USE_SYMVER_SUN] (quadmath.map-sun): Pass
$(libquadmath_la_OBJECTS), $(libquadmath_la_LIBADD) to
make_sunver.pl unmodified.
* Makefile.in: Regenerate.
libssp:
* Makefile.am [LIBSSP_USE_SYMVER_SUN] (ssp.map-sun): Pass
$(libssp_la_OBJECTS), $(libssp_la_LIBADD) to make_sunver.pl
unmodified.
* Makefile.in: Regenerate.
libstdc++-v3:
* src/Makefile.am [ENABLE_SYMVERS_SUN]
(libstdc++-symbols.ver-sun): Pass $(libstdc___la_OBJECTS),
$(libstdc___la_LIBADD) to make_sunver.pl unmodified.
* src/Makefile.in: Regenerate.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/make_sunver.pl | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/contrib/make_sunver.pl b/contrib/make_sunver.pl index 32e639e..4dd184d 100644 --- a/contrib/make_sunver.pl +++ b/contrib/make_sunver.pl @@ -17,6 +17,7 @@ # GNU mangling style. use FileHandle; +use File::Basename; use IPC::Open2; # Enforce C locale. @@ -37,12 +38,22 @@ my @OBJECTS = (); # List of shared objects to omit from processing. my @SHAREDOBJS = (); -# Filter out those input archives that have corresponding shared objects to -# avoid adding all symbols matched in the archive to the output map. foreach $file (@ARGV) { + # Filter out those input archives that have corresponding shared objects to + # avoid adding all symbols matched in the archive to the output map. if (($so = $file) =~ s/\.a$/.so/ && -e $so) { printf STDERR "omitted $file -> $so\n"; push (@SHAREDOBJS, $so); + # Skip libraries. + } elsif ($file =~ /^-l/) { + next; + # Convert libtool object/archive names to underlying objects/archives. + } elsif ($file =~ /\.l[ao]$/) { + my ($name, $path, $suffix) = fileparse($file, ".l[ao]"); + $suffix =~ s/l//; + # Strip leading ./ prepended by fileparse. + $path =~ s%^\./%%; + push (@OBJECTS, "$path.libs/$name$suffix") } else { push (@OBJECTS, $file); } |