From nobody Tue Dec 07 00:24:53 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 ABF9C18D1D7B; Tue, 7 Dec 2021 00:24:54 +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 4J7LfF3J0Cz3vwK; Tue, 7 Dec 2021 00:24:53 +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 3B03015D6C; Tue, 7 Dec 2021 00:24:53 +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 1B70Orub020947; Tue, 7 Dec 2021 00:24:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B70OrMn020946; Tue, 7 Dec 2021 00:24:53 GMT (envelope-from git) Date: Tue, 7 Dec 2021 00:24:53 GMT Message-Id: <202112070024.1B70OrMn020946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jessica Clarke Subject: git: 169b368a62aa - main - 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/main X-Git-Reftype: branch X-Git-Commit: 169b368a62aac38091a302b2970df81e0281e98f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638836693; 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=MLDrDjJOKZColMyyH6TE9KfPNrLESQ2Ja00EQ4kwhec=; b=KgVqBq180hK+d78ExiweclwmYdUbeoJfy2yGBlUuWSgmDog7jqVBM+Ltb4ZYks99xgtOox HjZPxqurs3o5JUQhnwnlr1CiK0FjT936RMTU2Pa6pr8w07ZuYkLYLt7442AGoekkK8uves 3SCErODwo97tgpuEuaKE1xO8z/KRP1IMxRvHqZvSqEOuGWcgLXoRq+rcpAN60yf+PzYaZw +c+0iS6H6tSEi/HFGiWHCovh+KOsFsDYzR4CHm7ViaKCJC27n2ND5J7QllcHSkVycNdYDv s7qcaaVEYYhSurjEE3WnXe22u92niBslWa6iE888COqWygvz5phCPKtmRGsTZQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638836693; a=rsa-sha256; cv=none; b=OqtytjTT34Cf3hO5DaLKoU4o8pvzh7vErH859OmthitubSaApijSnUcXEFJ7DSwyLgcrir 9HdJUICYGdB+ox/RmTLgeB9M6+9plM9fMn8yyt/mtSObWiY4XuI8Lv2Dn2v4HuxEh9t/XH 4cNrOF8+FhVpQUiHF6UnSn/Oj2i1pg5xaSpX92a9oRSPE12VTr731nlhLTrVl3Xr/5fCXN 8qitbeiM9THXpzTzVBbKeMsl2rAXpwLQzq8T3hm8c2ixE7+cVqKCw9gOAikSv4kiGQi+jD vlHWSaWFbsSvbTTqaOA1iPAL62b+Vw0hf/UFDdct5icyJIpTNq+a8+7M4hftxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=169b368a62aac38091a302b2970df81e0281e98f commit 169b368a62aac38091a302b2970df81e0281e98f Author: Jessica Clarke AuthorDate: 2021-12-06 23:09:29 +0000 Commit: Jessica Clarke CommitDate: 2021-12-07 00:24:20 +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 --- 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 263032415f53..86b54315d897 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