From nobody Tue Oct 26 13:57:33 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 9CC321826148; Tue, 26 Oct 2021 13:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HdtgK3tR3z3QVP; Tue, 26 Oct 2021 13:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 64BC41D56D; Tue, 26 Oct 2021 13:57:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19QDvXIe045060; Tue, 26 Oct 2021 13:57:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19QDvX43045059; Tue, 26 Oct 2021 13:57:33 GMT (envelope-from git) Date: Tue, 26 Oct 2021 13:57:33 GMT Message-Id: <202110261357.19QDvX43045059@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: c0cf36bc0210 - main - ncurses: rework static linker script generation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0cf36bc0210c4d74f626b944b4c7036cb01df5d Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=c0cf36bc0210c4d74f626b944b4c7036cb01df5d commit c0cf36bc0210c4d74f626b944b4c7036cb01df5d Author: Baptiste Daroussin AuthorDate: 2021-10-26 10:02:00 +0000 Commit: Baptiste Daroussin CommitDate: 2021-10-26 13:57:29 +0000 ncurses: rework static linker script generation Rework the generation of the linker script to make it in par with ldscript, this also forces the regeneration of the .aldscript in the obj dir which might in the past have ended up empty. Tested by: manu --- lib/ncurses/ncurses/Makefile | 19 +++++++++---------- lib/ncurses/ncurses/libncursesw.aldscript | 1 + 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/ncurses/ncurses/Makefile b/lib/ncurses/ncurses/Makefile index 951e8a4ea63f..af733d3ac613 100644 --- a/lib/ncurses/ncurses/Makefile +++ b/lib/ncurses/ncurses/Makefile @@ -170,13 +170,12 @@ SYMLINKS+= libncursesw_p.a ${LIBDIR}/libcurses_p.a LIBADD+= tinfow SHLIB_LDSCRIPT= libncursesw.ldscript STATIC_LDSCRIPT= libncursesw.aldscript -CLEANFILES+= ${STATIC_LDSCRIPT} +CLEANFILES+= libncursesw.a -libncursesw.aldscript: - @${ECHO} "INPUT(-lncursesw_real -ltinfow)" >$@ - -libncurses.ldscript: - @${ECHO} "INPUT(${SHLIB_NAME} AS NEEDED(-ltinfow))" >$@ +libncursesw.a: ${.CURDIR}/${STATIC_LDSCRIPT} + sed -e 's,@@LIB@@,${LIB},g' \ + -e 's,@@STATICLIB_SUFFIX@@,${_STATICLIB_SUFFIX},g' \ + ${.ALLSRC} > ${.TARGET} lib_gen.c: MKlib_gen.sh ${.OBJDIR:H}/tinfo/curses.h ncurses_dll.h LC_ALL=C sh ${NCURSES_DIR}/ncurses/base/MKlib_gen.sh "${CPP:N${CCACHE_BIN}} ${CFLAGS}" \ @@ -185,13 +184,13 @@ lib_gen.c: MKlib_gen.sh ${.OBJDIR:H}/tinfo/curses.h ncurses_dll.h expanded.c: MKexpanded.sh sh ${NCURSES_DIR}/ncurses/tty/MKexpanded.sh "${CC:N${CCACHE_BIN}} -E" ${CFLAGS} >expanded.c -all: ${STATIC_LDSCRIPT} +all: ${STATIC_LDSCRIPT} libncursesw.a -install-aldscript: ${STATIC_LDSCRIPT} +install-libncursesw.a: libncursesw.a ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -S -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ - ${_INSTALLFLAGS} ${STATIC_LDSCRIPT} ${DESTDIR}${_LIBDIR}/lib${LIB}.a + ${_INSTALLFLAGS} libncursesw.a ${DESTDIR}${_LIBDIR}/lib${LIB}.a -realinstall: install-aldscript +realinstall: install-libncursesw.a .include diff --git a/lib/ncurses/ncurses/libncursesw.aldscript b/lib/ncurses/ncurses/libncursesw.aldscript new file mode 100644 index 000000000000..337995f095c8 --- /dev/null +++ b/lib/ncurses/ncurses/libncursesw.aldscript @@ -0,0 +1 @@ +INPUT(-l@@LIB@@@@STATICLIB_SUFFIX@@ -ltinfow)