| Message ID | 20260805023956.3379890-3-vincent.mc.li@gmail.com |
|---|---|
| State | New |
| Headers |
Return-Path: <development+bounces-2472-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 4hFF7P0Zcsz3wkS
for <patchwork@web04.haj.ipfire.org>; Wed, 05 Aug 2026 02:42:25 +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 4hFF7D5wCGz1bD
for <patchwork@ipfire.org>; Wed, 05 Aug 2026 02:42:16 +0000 (UTC)
Received: from mail02.haj.ipfire.org (localhost [IPv6:::1])
by mail02.haj.ipfire.org (Postfix) with ESMTP id 4hFF5J1BzWz378w
for <patchwork@ipfire.org>; Wed, 05 Aug 2026 02:40:36 +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 server-signature ECDSA (secp384r1 raw public key)
server-digest SHA384
client-signature RSA-PSS (4096 bits) client-digest SHA256)
(Client CN "mail01.haj.ipfire.org", Issuer "YR2" (not verified))
by mail02.haj.ipfire.org (Postfix) with ESMTPS id 4hFF5F3WRfz36Zl
for <development@lists.ipfire.org>; Wed, 05 Aug 2026 02:40:33 +0000 (UTC)
Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com
[IPv6:2607:f8b0:4864:20::52f])
(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 4hFF5512z4z5Z3
for <development@lists.ipfire.org>; Wed, 05 Aug 2026 02:40:25 +0000 (UTC)
Authentication-Results: mail01.ipfire.org;
dkim=pass header.d=gmail.com header.s=20251104 header.b=kikbQ0YK;
spf=pass (mail01.ipfire.org: domain of vincent.mc.li@gmail.com designates
2607:f8b0:4864:20::52f 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=1785897625;
b=TFwkmrfbxKGy63G2eu2NcnWPijjFTrnvnDWkoCFo5ahvuzfCoQ+ERo38N66wr3exlFb3Rf
c4ESULPGi83/huGYArKqNH+ZIFCdRsVvRbLtkVJDndUdyVrWPg8vaPgawk8ez3lScQgsA5
+edPQjh9lWc47lxX2/PDA+8t6IeBLyHAVyU74x6gXAYxVzT+sY+8PJ68aLkpc+LSiqpwQm
f82dLDa5HI5NXLrG6O6ksXcjOWOQJYSeJZLlObSSMmZ36L/stBHT5Mrxll0KFBufrU3Se/
Ce1+76k/57/Y3AyhYMJC8BtwnqjxgA67ZqrSNdksB0RIbGl2qfHb1vYJc06VBQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed;
d=lists.ipfire.org;
s=202003rsa; t=1785897625;
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:
in-reply-to:in-reply-to:references:references:dkim-signature;
bh=rGmr8zlp3K0/331/PG5OfYZGDyHv4A55g9zLEgPBGHo=;
b=UOjeut0OS/0zkggEEP/IPjVbkclYcVxkXHT9ua4QoqiR5YxDj95I7rBxrg+hNXQtnL+l1y
2IuTgd7sk9OkrZLUT0FnCf/WdVVOR00ysmWtX5oYHm/z3u9JYKS80eh3468LTjqPAZvMG0
yamJOPowGT58/CvowXRp5xVdlzekxawSKRzWuZ3ZapIW/OMp7gD5/02YaFgaOHjjW5l3dw
//eHhGucIh5Au5uJbF6e1rHHjcjFp/BYHiCbTjhOP27U1pV11xSbeHgtARME3GejcMrSRs
/5qIuCsGi/J6Xo3nchP/EFOMpX3m7D0bE191rhT1dABh1ewEHV6HjwBJy8G+Rg==
ARC-Authentication-Results: i=1;
mail01.ipfire.org;
dkim=pass header.d=gmail.com header.s=20251104 header.b=kikbQ0YK;
spf=pass (mail01.ipfire.org: domain of vincent.mc.li@gmail.com designates
2607:f8b0:4864:20::52f as permitted sender)
smtp.mailfrom=vincent.mc.li@gmail.com;
dmarc=pass (policy=none) header.from=gmail.com
Received: by mail-pg1-x52f.google.com with SMTP id
41be03b00d2f7-ca88130e09aso344112a12.3
for <development@lists.ipfire.org>;
Tue, 04 Aug 2026 19:40:25 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1785897623; x=1786502423;
darn=lists.ipfire.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=rGmr8zlp3K0/331/PG5OfYZGDyHv4A55g9zLEgPBGHo=;
b=kikbQ0YKHIj7dhA5QBIkqJF6w3Yw4IUOZZQPf56WhBiU/xCQXcBN24LeecF7elh8S4
VF88n2xXmwfnuJgCQylpQEE+h25DRETw/JiTvwjAZAhizzdw5h6y3Um3RIlOQ2fobnjn
4O2ZIPQkxiEY9w3BH5F8JnWShKKONRDE19+LavEkuDSFu9MoN/VfU0uESXKzzuPTvV44
Qvru24OxYXaf7s38R3gxPSITSSQW8eE4NkOSk3RHmVFlnNCZTkT88odCmjIPS7JV6xy3
OiXcuANHTPQBrfM8U9I0BlnxRhpr8h24hqeWO9wt9KvjJQ1rQJFkVF9nnp239rebbta1
UChQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20251104; t=1785897623; x=1786502423;
h=content-transfer-encoding:mime-version:references:in-reply-to
: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=rGmr8zlp3K0/331/PG5OfYZGDyHv4A55g9zLEgPBGHo=;
b=YcRGMJv1+l0NGf3T7OP+B1lGNAAN+86v0QHzlWHgKWEW9J0pt4ft0YZAjY7WujoeYu
mE1LzUZdvNGUOz4UFp+LfYfKbDcx4g8zYggBnB6/QurN9ZjLwGcpO2smJ07Z+ZAqryhd
ZEMsIJT6Mrhagwm7c3c0+6nb+jPN5GPb/pJMEFr8DRycEgELs0XXlqyKHwbnZa35sBb3
COL65h2+qHM4hzPpxq44gCneNL8fsEvLOiELqHDfkDrHIPJbuD0MNjp3bIGCXAdz4sBL
O8MSKcOp1HBPY6OggDQ/Wb349Wdga154SwkXyE891TMVxx8/c7Gj0KYnD97kHas/Yxom
MnHg==
X-Forwarded-Encrypted: i=1;
AHgh+RrB+y1ogHuD/t2R6VquFOaBgxL8UroLmlpjaerAJjYAQgEHU3bpbsDNwQZT0gDLFot+lHz9W4fEpgyPzw==@lists.ipfire.org
X-Gm-Message-State: AOJu0YzssNrTge6FoeJzIhuJTp8cLCBYcs8/nAhXpbh8+ZzcnitJO/KO
pqWu0ZioVpleYpxBwPj7+F9/t4LQlWqyvvtqxAWA/rEQQfaQr0i3A5YU
X-Gm-Gg: AR+sD11Dlm1tPNJ5Cqm8sRdRsDL+Bc9ARv99/sarAJ3/NrfHul/jzBHPQMoQKPsBEKm
MP6A87CjX40cOv7c1eIWeuMw99JKCbW9vmIOZKMeepgG7daySHIIEqnN/EWBr4WsYdao7DW7UFp
0YjiaKJAu5GhL0M2Wqg5A/Qvp+srs1l8BwfhUi73dnJgmv0dtht0w0+/i7fIdmqJG8p112VzUgP
cB/HtiU46rcpFLDG8J3nLqfx5Zu3H/0g95xuctnh+STSjHcmqPnQVo9g5jq7wlf7HoKQIIXbCN3
ZDZ10cPNWMKrMzZQfjPPVHQmx+CwqdhrqcQ1KlhHjx8ZQCXIRPIVQ1DEv03k8OAWVBRTI6oyA7z
EmIFbiUkdb00KHcbbLvvw5OwpyWaL1ohkBxPjee14EXI1e/EVpMK21tELC8JvSB6R+QJwyTmL5E
74JoqpeGowTDglRLiqW/PU76aSLM7gim5jrBME2xJU3+NVf3ETdMrfCjgYbqChzYRyt9+b
X-Received: by 2002:a05:6a20:258e:b0:3c3:875d:7053 with SMTP id
adf61e73a8af0-3cb85df192fmr3148150637.8.1785897623053;
Tue, 04 Aug 2026 19:40:23 -0700 (PDT)
Received: from sc.10086.cn ([2409:8a62:4216:8470:43c3:3b45:83f6:fb4a])
by smtp.gmail.com with ESMTPSA id
41be03b00d2f7-cbe708be5bdsm476544a12.15.2026.08.04.19.40.20
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Tue, 04 Aug 2026 19:40:22 -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>,
Vincent Li <VincentLivincent.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:39:50 -0700
Message-Id: <20260805023956.3379890-3-vincent.mc.li@gmail.com>
X-Mailer: git-send-email 2.38.1
In-Reply-To: <20260805023956.3379890-1-vincent.mc.li@gmail.com>
References: <20260805023956.3379890-1-vincent.mc.li@gmail.com>
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: 4hFF5512z4z5Z3
X-Rspamd-Action: no action
X-Spamd-Result: default: False [-5.08 / 11.00];
BAYES_HAM(-3.00)[100.00%];
R_DKIM_ALLOW(-1.69)[gmail.com:s=20251104];
SUSPICIOUS_RECIPS(1.50)[];
DKIM_REPUTATION(-0.96)[-0.95925563116036];
SPF_REPUTATION_HAM(-0.53)[-0.53023859239936];
R_MISSING_CHARSET(0.50)[];
DMARC_POLICY_ALLOW(-0.50)[gmail.com,none];
R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4864::/56:c];
MX_GOOD(-0.10)[gmail-smtp-in.l.google.com];
MIME_GOOD(-0.10)[text/plain];
FREEMAIL_ENVFROM(0.00)[gmail.com];
IP_REPUTATION_HAM(0.00)[asn: 15169(-0.30), country: US(-0.01),
ip: 2607:f8b0:4864:20::(-0.76)];
FROM_EQ_ENVFROM(0.00)[];
RCVD_COUNT_TWO(0.00)[2];
DWL_DNSWL_NONE(0.00)[gmail.com:dkim];
ARC_NA(0.00)[];
TO_DN_SOME(0.00)[];
RCVD_TLS_LAST(0.00)[];
FREEMAIL_FROM(0.00)[gmail.com];
MIME_TRACE(0.00)[0:+];
ALIAS_RESOLVED(0.00)[];
ARC_SIGNED(0.00)[lists.ipfire.org:s=202003rsa:i=1];
ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US];
RCVD_VIA_SMTP_AUTH(0.00)[];
MID_RHS_MATCH_FROM(0.00)[];
TO_MATCH_ENVRCPT_SOME(0.00)[];
PREVIOUSLY_DELIVERED(0.00)[development@lists.ipfire.org];
DKIM_TRACE(0.00)[gmail.com:+];
RCPT_COUNT_THREE(0.00)[4];
FREEMAIL_CC(0.00)[gmail.com];
RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::52f:from];
FROM_HAS_DN(0.00)[]
X-Rspamd-Server: mail01.haj.ipfire.org
|
| Series |
Add loongarch64 architecture support to IPFire
|
|
Commit Message
Vincent Li
5 Aug 2026, 2:39 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 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}..."; \