From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1147) id D47563858D1E; Mon, 6 May 2024 07:31:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D47563858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1714980695; bh=HnVbi5t/oni7rWDI53O3f1xdmrd3u3M4SIldylwMmVM=; h=From:To:Subject:Date:From; b=vohkmNVPCHSuE2wifH+/EH+gCDTxZpVsgg2Kr0NyMR0+ITZBstjDVkP5rjl82ujt1 HzrQ9Rn+utbYeI0sonpGz7g086OKXnqoK92DHPmHB/BNQW7MCy/N4VRkHNg1UvHPs6 XqBQJTQXj9kihUUbfnk83rvhmfymLoOkfzOSD8gs= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Rainer Orth To: gcc-cvs@gcc.gnu.org Subject: [gcc r15-172] libgfortran: Fix libgfortran.so versioning on Solaris with subdirs X-Act-Checkin: gcc X-Git-Author: Rainer Orth X-Git-Refname: refs/heads/master X-Git-Oldrev: 7d5d2b879ae7636ca118fb4f3a08b22705cdeacb X-Git-Newrev: 8daf4eb02a2e739d5c62b94528adfddaed506a0a Message-Id: <20240506073135.D47563858D1E@sourceware.org> Date: Mon, 6 May 2024 07:31:35 +0000 (GMT) List-Id: https://gcc.gnu.org/g:8daf4eb02a2e739d5c62b94528adfddaed506a0a commit r15-172-g8daf4eb02a2e739d5c62b94528adfddaed506a0a Author: Rainer Orth Date: Mon May 6 09:31:11 2024 +0200 libgfortran: Fix libgfortran.so versioning on Solaris with subdirs The move of libgfortran objects to subdirectories completely broke the creation of libgfortran.so on Solaris. Since the gfortran.ver-sun rule doesn't support that structure, no libtool objects are found, thus no symbols exported from libgfortran.so, causing every link to fail. This patch fixes this by allowing for the new structure. Tested on i386-pc-solaris2.11 and sparc-sun-solaris2.11. 2024-05-05 Rainer Orth libgfortran: * Makefile.am [LIBGFOR_USE_SYMVER_SUN] (gfortran.ver-sun): Handle objects in subdirs. * Makefile.in: Regenerate. Diff: --- libgfortran/Makefile.am | 2 +- libgfortran/Makefile.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libgfortran/Makefile.am b/libgfortran/Makefile.am index 8bef1729219..9e1d12f7546 100644 --- a/libgfortran/Makefile.am +++ b/libgfortran/Makefile.am @@ -29,7 +29,7 @@ gfortran.ver-sun : gfortran.ver \ $(libgfortran_la_OBJECTS) $(libgfortran_la_LIBADD) perl $(top_srcdir)/../contrib/make_sunver.pl \ gfortran.ver \ - $(libgfortran_la_OBJECTS:%.lo=.libs/%.o) \ + $(subst /,/.libs/,$(libgfortran_la_OBJECTS:.lo=.o)) \ `echo $(libgfortran_la_LIBADD) | \ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \ > $@ || (rm -f $@ ; exit 1) diff --git a/libgfortran/Makefile.in b/libgfortran/Makefile.in index f4fe0ebc43e..ab10a476eae 100644 --- a/libgfortran/Makefile.in +++ b/libgfortran/Makefile.in @@ -4576,7 +4576,7 @@ uninstall-am: uninstall-cafexeclibLTLIBRARIES uninstall-gfor_cHEADERS \ @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ $(libgfortran_la_OBJECTS) $(libgfortran_la_LIBADD) @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ perl $(top_srcdir)/../contrib/make_sunver.pl \ @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ gfortran.ver \ -@LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ $(libgfortran_la_OBJECTS:%.lo=.libs/%.o) \ +@LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ $(subst /,/.libs/,$(libgfortran_la_OBJECTS:.lo=.o)) \ @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ `echo $(libgfortran_la_LIBADD) | \ @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \ @LIBGFOR_USE_SYMVER_SUN_TRUE@@LIBGFOR_USE_SYMVER_TRUE@ > $@ || (rm -f $@ ; exit 1)