From nobody Tue Jan 25 01:40:07 2022 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 401511972CCA; Tue, 25 Jan 2022 01:40:09 +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 4JjV0R5GQPz4Zfc; Tue, 25 Jan 2022 01:40:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643074808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tklHGYU8Mihja1zbrDcmrFKJzodDpw2Ycpa0XyloWMs=; b=MtOp8BkvkavkQGl4l0EBMeAOxI4jpiDY6hTiFOSKTyAnOTP3K8PaIOLF/fEt5g3GfbwW2F CRMemaSyg5QjGm42n/L3p3YM3fDxiAQODuo3tQ98OZR2oBkAzUaAFfpPn7yujVjwDeaBIP KsBekidtovsgVPQu5nbOSs+sEUeTMNHh8bE6cW+kiHw3BdJFueBF6Du73HkVD1MU+PH9eM cyutu8qbAgYxZIEbsX4BgpmY1cgcJFrutqg69ypFPdUVA2inqV7qUuzs6u5m9243/Iju+a 0o21+ZqbbmWZN9FeUo6QbvBAJ9cqTx4pItBXrONkBSFV9bAu443D71TVzhLlEw== 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 587C620B39; Tue, 25 Jan 2022 01:40:07 +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 20P1e7RU045779; Tue, 25 Jan 2022 01:40:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20P1e7Ev045776; Tue, 25 Jan 2022 01:40:07 GMT (envelope-from git) Date: Tue, 25 Jan 2022 01:40:07 GMT Message-Id: <202201250140.20P1e7Ev045776@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jessica Clarke Subject: git: 1c818a7e577c - stable/13 - amd64: Pass DEBUG when building VDSO wrapper 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: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 1c818a7e577ce30bc7ca852513e7877024424f35 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643074808; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tklHGYU8Mihja1zbrDcmrFKJzodDpw2Ycpa0XyloWMs=; b=G+JJAJ2whOAdshIKdYGk1MAimqT5r5AmvqA3xLgKPgfcutnh5mBZG7KuZogerxaIWQMn/V wAxYR3Or39V4FJHgM42RGbsVLdiEUl7fihqlRQJLrp0eL4ZJZtmzynXuol+uL31HRM5TRy 0Ar1tyFKckL9MwFj15Eg3kAB9fFh7CzHueF4Rq8ySWgF86K16Rmp3S23+G2wKCbk4Iusj8 gvJVjilXC4468wSHHM6FpS0+83y40Ts/qvWYsPQa84RyS15t9AQDbWhLSdBVIpQPH7jpVi eXXJco7XRMYKm3PbEfZwo6elaA34cSJtVGMwTluik819hITkbQmVzHaUo+01yg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643074808; a=rsa-sha256; cv=none; b=S6golXeln/kbMvcTzpO/BzK5Fqf8m392JoEUspNb/Z5pnxwsicDdP0XrmRkQLZlxIXkJyS SM06pHwfGVeQpuCZCcAJovB6862eP74dXYGQ9rY8dEnDNx3gt4NLkud8taoBRESTekf1S4 gj2IyLM/DwkxbfHtud4WnXm75xH43BgNztpP37+2+nfaziViKgEV5DilZ3j2km4qd/SlFV scm9kNBrOL4n2Uu8ffaJPRczw8bKfaEo/2G8xeA4z9SVPCKxHGb5P/NDmH2/TXOVCFoV+b AY4hTh06iCA/wOnmUNF8JXFO3sm865qTn5WzYDkxp5dEnx0AuiDhPiqZslBwPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=1c818a7e577ce30bc7ca852513e7877024424f35 commit 1c818a7e577ce30bc7ca852513e7877024424f35 Author: Jessica Clarke AuthorDate: 2021-12-06 23:09:29 +0000 Commit: Jessica Clarke CommitDate: 2022-01-24 23:59:30 +0000 amd64: Pass DEBUG when building VDSO wrapper Not doing so results in ctfconvert failing with ERROR: ctfconvert: elf-vdso.so.o doesn't have type data to convert On FreeBSD this is non-fatal, since the ctf tools have a hack to make such errors not fail the build and instead just silently continue without CTF data (which is a bad idea these days and should probably be removed; they date back to the original import). However, those are under #ifdef __FreeBSD__ so do not apply when cross-building from non-FreeBSD, causing the build to fail. Fix this by forwarding DEBUG on to the compiler invocation for the VDSO wrapper. It's assembly so it's not hugely useful, but there is a non-zero amount of information preserved, and other assembly files are built with -g by default too so this matches them; the alternative would be to tag the files.amd64 entries with no-ctfmerge. Note that the VDSO itself is still compiled without debug info, this only affects the wrapper linked into the kernel. Fixes: 98c8b6252496 ("vdso for ia32 on amd64"), ab4524b3d7fb ("amd64: wrap 64bit sigtramp into vdso") MFC after: 1 month (cherry picked from commit 169b368a62aac38091a302b2970df81e0281e98f) --- sys/conf/files.amd64 | 4 ++-- sys/tools/amd64_ia32_vdso.sh | 2 +- sys/tools/amd64_vdso.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 9eed2470c720..8bb59143df88 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -14,13 +14,13 @@ include "conf/files.x86" # elf-vdso.so.o standard \ dependency "$S/amd64/amd64/sigtramp.S assym.inc $S/tools/amd64_vdso.sh" \ - compile-with "env AWK='${AWK}' NM='${NM}' LD='${LD}' CC='${CC}' OBJCOPY='${OBJCOPY}' ELFDUMP='${ELFDUMP}' S='${S}' sh $S/tools/amd64_vdso.sh" \ + compile-with "env AWK='${AWK}' NM='${NM}' LD='${LD}' CC='${CC}' DEBUG='${DEBUG}' OBJCOPY='${OBJCOPY}' ELFDUMP='${ELFDUMP}' S='${S}' sh $S/tools/amd64_vdso.sh" \ no-implicit-rule before-depend \ clean "elf-vdso.so.o elf-vdso.so.1 vdso_offsets.h sigtramp.pico" # elf-vdso32.so.o optional compat_freebsd32 \ dependency "$S/amd64/ia32/ia32_sigtramp.S ia32_assym.h $S/tools/amd64_ia32_vdso.sh" \ - compile-with "env AWK='${AWK}' NM='${NM}' LD='${LD}' CC='${CC}' OBJCOPY='${OBJCOPY}' ELFDUMP='${ELFDUMP}' S='${S}' sh $S/tools/amd64_ia32_vdso.sh" \ + compile-with "env AWK='${AWK}' NM='${NM}' LD='${LD}' CC='${CC}' DEBUG='${DEBUG}' OBJCOPY='${OBJCOPY}' ELFDUMP='${ELFDUMP}' S='${S}' sh $S/tools/amd64_ia32_vdso.sh" \ no-implicit-rule before-depend \ clean "elf-vdso32.so.o elf-vdso32.so.1 vdso_ia32_offsets.h ia32_sigtramp.pico" # diff --git a/sys/tools/amd64_ia32_vdso.sh b/sys/tools/amd64_ia32_vdso.sh index d03249dd4940..6198ca8c6ffa 100644 --- a/sys/tools/amd64_ia32_vdso.sh +++ b/sys/tools/amd64_ia32_vdso.sh @@ -53,7 +53,7 @@ then exit 1 fi -${CC} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \ +${CC} ${DEBUG} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \ -o elf-vdso32.so.o -I. -I"${S}" -include opt_global.h \ -DVDSO_NAME=elf_vdso32_so_1 -DVDSO_FILE=elf-vdso32.so.1 \ "${S}"/tools/vdso_wrap.S diff --git a/sys/tools/amd64_vdso.sh b/sys/tools/amd64_vdso.sh index 8b9871e86802..c6fec72b8bbd 100644 --- a/sys/tools/amd64_vdso.sh +++ b/sys/tools/amd64_vdso.sh @@ -62,7 +62,7 @@ then exit 1 fi -${CC} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \ +${CC} ${DEBUG} -x assembler-with-cpp -DLOCORE -fPIC -nostdinc -c \ -o elf-vdso.so.o -I. -I"${S}" -include opt_global.h \ -DVDSO_NAME=elf_vdso_so_1 -DVDSO_FILE=elf-vdso.so.1 \ "${S}"/tools/vdso_wrap.S