| Message ID | 20260805024247.3379954-1-vincent.mc.li@gmail.com |
|---|---|
| State | New |
| Headers |
Return-Path: <development+bounces-2479-patchwork=ipfire.org@lists.ipfire.org>
Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519)
(Client CN "mail01.haj.ipfire.org", Issuer "YR2" (not verified))
by web04.haj.ipfire.org (Postfix) with ESMTPS id 4hFFDL1Nqdz3wkS
for <patchwork@web04.haj.ipfire.org>; Wed, 05 Aug 2026 02:46:42 +0000 (UTC)
Received: from mail02.haj.ipfire.org (mail02.haj.ipfire.org [172.28.1.201])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519)
(Client CN "mail02.haj.ipfire.org", Issuer "YE1" (not verified))
by mail01.ipfire.org (Postfix) with ESMTPS id 4hFFDB051jz2sq
for <patchwork@ipfire.org>; Wed, 05 Aug 2026 02:46:34 +0000 (UTC)
Received: from mail02.haj.ipfire.org (localhost [IPv6:::1])
by mail02.haj.ipfire.org (Postfix) with ESMTP id 4hFF8J29jqz36Zh
for <patchwork@ipfire.org>; Wed, 05 Aug 2026 02:43:12 +0000 (UTC)
X-Original-To: development@lists.ipfire.org
Received: from mail01.ipfire.org (mail01.haj.ipfire.org [172.28.1.202])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange x25519)
(Client CN "mail01.haj.ipfire.org", Issuer "YR2" (not verified))
by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4hFF8F5T6lz36WS
for <development@lists.ipfire.org>; Wed, 05 Aug 2026 02:43:09 +0000 (UTC)
Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com
[IPv6:2607:f8b0:4864:20::42f])
(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 (2048 bits) client-digest SHA256)
(Client CN "smtp.gmail.com", Issuer "WR4" (verified OK))
by mail01.ipfire.org (Postfix) with ESMTPS id 4hFF854gffz1bD
for <development@lists.ipfire.org>; Wed, 05 Aug 2026 02:43:01 +0000 (UTC)
Authentication-Results: mail01.ipfire.org;
dkim=pass header.d=gmail.com header.s=20251104 header.b=C1RNOq1I;
spf=pass (mail01.ipfire.org: domain of vincent.mc.li@gmail.com designates
2607:f8b0:4864:20::42f as permitted sender)
smtp.mailfrom=vincent.mc.li@gmail.com;
dmarc=pass (policy=none) header.from=gmail.com
ARC-Seal: i=1; a=rsa-sha256; d=lists.ipfire.org; s=202003rsa; cv=none;
t=1785897781;
b=L5UTBoisHOSXnN7Btrny9B/3o4J/g19l/RYKlYp1xoNgzyX2YlDuAexXUmYT2V5znVPSMr
LBDrDm6P45dPX2ziZe5rUwLw+T3x/+mN2/zINMHHZY1piZHg9HQZyOavnE+RYzxCqTi7KP
kZJZwBYAEgodeVZUBLYGkEKe5R8Rc7EdZc9e5tM3xru8L8Y3aOGIdnK14EuO5zNxuz6uUt
sUhYVsMz8h1/pHvB39DLaFVL8zlTcGuZzERoxFpx8FaRsyMYhS+zwvHBJqFutBI7wYekFS
SBetHALlyXP/vVZGBGBYL1T48XKG9m3Z7R5uS2NiUb24LDlp+efiPH+BQb7PDg==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=lists.ipfire.org;
s=202003rsa; t=1785897781;
h=from:from:reply-to:subject:subject:date:date:message-id:message-id:
to:to:cc:cc:mime-version:mime-version:
content-transfer-encoding:content-transfer-encoding:dkim-signature;
bh=V3oDtcydmgDn45ch0Re83Ah480qW+ulMMnxuE7XO9tk=;
b=LI5i8OP9zNXXwRG+smm0kjxJoBVzyX3B4txHvwgOMHVQvgtOyIhbKzO6ge3nRN3t0GxYP+
el9E5x9mItkLubUmLMJaXIkUj+xl5BRrds3iOJmSlzUMzEOt9xHcnYkPUthkSOz8N64YJk
KUDo18ioopOvLBTEvg/UzFl7rYvxfHoJSbO1mQOfuOS4aD9aAyLdSNLoOE78cqjgp9dN+Y
tzN0uRhOIg0Ic/M4xGr6kcOtlamdKbYdhzklwAinRxhp8espQfFPGgmkFEhAI2pd/om+Zm
w2bf10W8lC3OqiH439/0cEbdZQshbgUgivbwdf84eEckegw8m3KjM3mt6RK27g==
ARC-Authentication-Results: i=1;
mail01.ipfire.org;
dkim=pass header.d=gmail.com header.s=20251104 header.b=C1RNOq1I;
spf=pass (mail01.ipfire.org: domain of vincent.mc.li@gmail.com designates
2607:f8b0:4864:20::42f as permitted sender)
smtp.mailfrom=vincent.mc.li@gmail.com;
dmarc=pass (policy=none) header.from=gmail.com
Received: by mail-pf1-x42f.google.com with SMTP id
d2e1a72fcca58-8487b7b3fc8so549701b3a.3
for <development@lists.ipfire.org>;
Tue, 04 Aug 2026 19:43:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1785897780; x=1786502580;
darn=lists.ipfire.org;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
bh=V3oDtcydmgDn45ch0Re83Ah480qW+ulMMnxuE7XO9tk=;
b=C1RNOq1IeSurAakkSKpQY1BVZaRNfKmW4otAK+x0sOs/TvdzVmfLf/Qv7VgTRcx1lu
ZOXtfbjbcjTl6zl5FBEF2Cu9UeD7Ze/KRColN5eRG6P8y+kwEjOXSjJ1iTJiSuMIXvt0
AvJv0eihutWWCWqK+CJcmz9p3D3SMLImRrnnItDY86GShPF0cN1RIASvsaCHIwS7SQx3
A5vjVeotD4wZonySqi9k47N8tHAPRbC18IN65T5Jz6Nos+t3jONWWX+N3WMlT1AG7FHr
cOzAaZFAzaLISlU/aIJt22Rs5t8r08h7i5NdNuUKDIkcHEyI6z2mx9Owy9Mg/5kOJflt
Jd4A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20251104; t=1785897780; x=1786502580;
h=content-transfer-encoding:mime-version:message-id:date:subject:cc
:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=V3oDtcydmgDn45ch0Re83Ah480qW+ulMMnxuE7XO9tk=;
b=HMYPlWfJxGhSYgw04JxmJfWD9l1ojpEYHdNN6Km3FlaLu8+XvNdoQyo5Lam4lbV37b
7iWG7ygjl7w8sjiCXM1zedFS7o3r789cmgm6JprMfc8F36QxJOn/Wcj1+PIti6p6hRbq
QGyXYXJVH7f4qpbi4stKv8FLQXuOWBHXxpT6wQUASM4WPtGUCaL2vZxqEftVftzrkzhL
L7/khubQUGRCqG1tlozvU+UeIRQ33gXL9cm1lP+6Kh70LICX0TjlYIwZzAjrttD5JaD+
vtQhxPxWkT8Ad00KGTE4ZkjHuADTHNvEbKyIgd1PgTRN6ViH/icQItZ3HcIcRanlP8Vy
4UWg==
X-Forwarded-Encrypted: i=1;
AHgh+Rp1acB8Bs5qr+jf07aLw/NJk5uizegL/8O4qs4spMx27BZFNGGqzMHtxEUSJ9kbNr8JCRFVjXNzHaVbyw==@lists.ipfire.org
X-Gm-Message-State: AOJu0YzUqngBQ/6SLZAs6l1y9o2F3RSK+R86Dsj+pMWyITFXH97R5Xzh
HN0oKyEGaYc162o2kj3SrJXNVp7mXgTvNwSgs+ZsYbU2jeu/9gezGG0u3iLAtsg9r64=
X-Gm-Gg: AR+sD12A2XBKiaoi/nXLHvODbClmqiA/C7SLfs8gb0jdfgziTGSi8pBWpEtzJnZBGgu
YaSueI3MrYX5TOv9X/9y0+yTBW4xLAVZu0DSGpcB1TWVOy2o+6f3ujq/oOySbgAhA8TyAEG3PMW
hfVO2uryvEQvu4la94sJ+N8G8VQpLxuJHhXmxsXcYQFvKbtES9mp6/XjsaQsfr4ji54l3GChpzS
NPUiqM/+BhyL18hvdBU1U3kzF5sLpZ45BIaN7q6GvTJWyd3w93QA1jBEbvuXBSXyXmHy+0Xh6FH
17Qh8bHZliMU3rkklxSdGHcyOapB7c8eTf3nPpV0xCz1WTVjvuuShdJC+zBVY2k+cgD/ft7PqGy
alh4LKGnxtemoGT7GrJjAtArq6gsLxlWfT9iGXPUGmTh1Ba82FqXaN0AXgFQTEg59+XeIMN3RPR
JH4Yra/LpCq7q8r4a7SDGUuSt/Yj4GxSw9ieKmFuOE8hWKWAV4Cchw6+DcN8oRVRgGUGlq
X-Received: by 2002:a05:6a00:1256:b0:848:5cf5:5040 with SMTP id
d2e1a72fcca58-84f2dff7a2fmr3029550b3a.10.1785897779734;
Tue, 04 Aug 2026 19:42:59 -0700 (PDT)
Received: from sc.10086.cn ([2409:8a62:4216:8470:43c3:3b45:83f6:fb4a])
by smtp.gmail.com with ESMTPSA id
d2e1a72fcca58-84f2e2e3465sm361638b3a.20.2026.08.04.19.42.56
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Tue, 04 Aug 2026 19:42:57 -0700 (PDT)
From: Vincent Li <vincent.mc.li@gmail.com>
To: Michael Tremer <michael.tremer@ipfire.org>,
development@lists.ipfire.org
Cc: Vincent Li <vincent.mc.li@gmail.com>
Subject: [PATCH v1 2/8] gcc: Add dynamic linker path for loongarch64 native
toolchain build
Date: Tue, 4 Aug 2026 19:42:47 -0700
Message-Id: <20260805024247.3379954-1-vincent.mc.li@gmail.com>
X-Mailer: git-send-email 2.38.1
Precedence: list
List-Id: <development.lists.ipfire.org>
List-Subscribe: <https://lists.ipfire.org/>,
<mailto:development+subscribe@lists.ipfire.org?subject=subscribe>
List-Unsubscribe: <https://lists.ipfire.org/>,
<mailto:development+unsubscribe@lists.ipfire.org?subject=unsubscribe>
List-Post: <mailto:development@lists.ipfire.org>
List-Help: <mailto:development+help@lists.ipfire.org?subject=help>
Sender: <development@lists.ipfire.org>
Mail-Followup-To: <development@lists.ipfire.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-Rspamd-Queue-Id: 4hFF854gffz1bD
X-Rspamd-Action: no action
X-Spamd-Result: default: False [-6.59 / 11.00];
BAYES_HAM(-3.00)[100.00%];
R_DKIM_ALLOW(-1.69)[gmail.com:s=20251104];
DKIM_REPUTATION(-0.96)[-0.95924864731428];
SPF_REPUTATION_HAM(-0.54)[-0.54285544003589];
R_MISSING_CHARSET(0.50)[];
DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4864::/56:c];
MIME_GOOD(-0.10)[text/plain];
MX_GOOD(-0.10)[gmail-smtp-in.l.google.com];
RCVD_TLS_LAST(0.00)[];
IP_REPUTATION_HAM(0.00)[asn: 15169(-0.30), country: US(-0.01),
ip: 2607:f8b0:4864:20::(-0.77)];
ARC_NA(0.00)[];
FROM_EQ_ENVFROM(0.00)[];
MIME_TRACE(0.00)[0:+];
FREEMAIL_FROM(0.00)[gmail.com];
TO_DN_SOME(0.00)[];
DWL_DNSWL_NONE(0.00)[gmail.com:dkim];
FREEMAIL_ENVFROM(0.00)[gmail.com];
PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org];
RCVD_COUNT_TWO(0.00)[2];
FREEMAIL_CC(0.00)[gmail.com];
RCVD_VIA_SMTP_AUTH(0.00)[];
MID_RHS_MATCH_FROM(0.00)[];
ALIAS_RESOLVED(0.00)[];
RCPT_COUNT_THREE(0.00)[3];
ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US];
TO_MATCH_ENVRCPT_SOME(0.00)[];
ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1];
RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::42f:from];
DKIM_TRACE(0.00)[gmail.com:+];
FROM_HAS_DN(0.00)[]
X-Rspamd-Server: mail01.haj.ipfire.org
|
| Series |
None
|
|
Commit Message
Vincent Li
5 Aug 2026, 2:42 a.m. UTC
When building GCC natively on loongarch64 as part of the toolchain
bootstrap, the generated spec file incorrectly uses the default system
library path "/lib" for the dynamic linker. This causes the glibc build
to fail during validation because the compiled test program requests
the system runtime linker at /lib/ld-linux-loongarch-lp64d.so.1 instead
of the toolchain-specific path /tools_loongarch64/lib/.
The ABI_GRLEN_SPEC macro in gcc/config/loongarch/gnu-user.h defines
the dynamic linker path pattern. During the initial toolchain bootstrap
stage (PASS=1 with TOOLCHAIN=1), this needs to reference $(TOOLS_DIR)/lib
where the bootstrap runtime linker is installed, rather than the system
/lib path which may not yet have a compatible runtime linker.
Add a conditional sed substitution for loongarch64 builds that replaces
'"/lib" ABI_GRLEN_SPEC' with '"$(TOOLS_DIR)/lib" ABI_GRLEN_SPEC' in
gnu-user.h. This ensures GCC generates the correct dynamic linker path
for the bootstrap environment.
Without this change, the glibc build validation fails with:
readelf -l dummy | grep "Requesting program interpreter: /tools_loongarch64"
make: *** [glibc:131: /usr/src/ipfire-2.x/log_loongarch64/glibc-2.43-tools] Error 1
Assisted-by: DeepSeek-V4-Flash
Signed-off-by: Vincent Li <vincent.mc.li@gmail.com>
---
lfs/gcc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lfs/gcc b/lfs/gcc index c3a8da602..6645b2e03 100644 --- a/lfs/gcc +++ b/lfs/gcc @@ -229,6 +229,10 @@ ifeq "$(TOOLCHAIN)" "1" cd $(DIR_APP) && tar xfa $(DIR_DL)/mpc-$(MPC_VER).tar.gz cd $(DIR_APP) && mv -v mpc-$(MPC_VER) mpc +ifeq "$(BUILD_ARCH)" "loongarch64" + sed -i '/ABI_GRLEN_SPEC/s@"/lib" ABI_GRLEN_SPEC@"$(TOOLS_DIR)/lib" ABI_GRLEN_SPEC@g' $(DIR_APP)/gcc/config/loongarch/gnu-user.h +endif + for file in $$(find $(DIR_APP)/gcc/config -name linux64.h -o -name linux.h \ -o -name sysv4.h -o -name linux-eabi.h -o -name linux-elf.h -o -name aarch64-linux.h); do \ echo "Processing $${file}..."; \