From patchwork Mon Jan 6 10:12:32 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 55052 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 218CBE7719D for ; Mon, 6 Jan 2025 10:12:51 +0000 (UTC) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) by mx.groups.io with SMTP id smtpd.web10.56579.1736158363426623464 for ; Mon, 06 Jan 2025 02:12:43 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=sUYqJ5FU; spf=pass (domain: smile.fr, ip: 209.85.221.46, mailfrom: romain.naour@smile.fr) Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-385e2880606so10304030f8f.3 for ; Mon, 06 Jan 2025 02:12:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1736158362; x=1736763162; darn=lists.yoctoproject.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; bh=6BnX9RZk7Gw4mpWeX/rIMC1Jl1reSK28/lMw2c+u6dE=; b=sUYqJ5FUChQp+4WXnF4f2ieKBCzgLGmoqCZesfRDpG1SQIlFAOutcY86hs7COyETub 8Df47Fxtnx6eIZj3SE89llZxqUlxU/Y9haWIWNaR0Tm0wvMbLnAdknWU++P6BATR2GUz 5BguHu1YzVCf7qrlthHeV2DM8r6fnJNZKIaWY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736158362; x=1736763162; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6BnX9RZk7Gw4mpWeX/rIMC1Jl1reSK28/lMw2c+u6dE=; b=kvSWitZFJZ+rFhezuRu/Uyo98wJ1opIlUdFWQ9afbfgCbBqYEtUclMJZvh5PfrdBG4 UN2o1VxlXQ+RKv5Ua78X7+2XndkknWX48NXuFcztCCTtaScK9R3S8AZ9RVGODQB5GlFD i+B5MvIJ0XSwJ/Rjoge0gpqa8nMJ3qhyZCNe5pYqYEh5apH9hkHgFEtKslgn8d2NOvEC qk0BQVmHx9xvA+e7L5FOCb6P+wOhnCvTpOJXUsjjFIfjWxDXC9iNlfl4DNMPnD8L+yNZ aYiXKVvW2XIYHQi34YMFz3VVrpKWLbPeAopXOmm4GF0WIVlCR5gEzq1zq8UiRa+0LO3v Wc7g== X-Gm-Message-State: AOJu0YyGkh6kG4+rKCs5Ady3Ue8KtHmhT7PQf5+VZ1uGb4cEMMv+do2k 5+dJL4eMx5phRsHysUH4yPQzKyPrbCRO5PTogyWYN6pM3ON5TvXLEO/dhK/2gwhvBNt3ytaysLH D X-Gm-Gg: ASbGncvUQjKleegYm673fUxl4tX/dnaD7MU1jJGOQpmh7szlrf9sh5MRNApVv7i6z8V XurQXZgKPeU8oTLXLGa9nxsPABMVYfgWkWcqlCEyvNK4Izdu1IyY2ZBj1/9cZuM7m7y+naKAs1S /W5hh3PNsCaLT9E4ZRH+iEjzNPL8uRw9c3MSs6foGz1QPo7SbFStwnQUNMUFXZU7YmHZjRqJxX2 fdMz8m9X7CkHlIXbSXkDn5nEkB/fLfkogLB16rffcNtwi4qjOkIKl9wwnAkb2/7zBHDteuch4Wv 7W9KtEm6WJKE/oLxZUIGIaW7/+s4NCLhps3DxhksqOGd65dw2p5m/g== X-Google-Smtp-Source: AGHT+IFrhvpkS5KxN33HpFM+MLMhULxEarEPu7ad3YjprehQxDxLF/x42LCLeqlRR/tL9pOqGxgWKw== X-Received: by 2002:a05:6000:1846:b0:385:e88a:7037 with SMTP id ffacd0b85a97d-38a221e27afmr49001760f8f.6.1736158361885; Mon, 06 Jan 2025 02:12:41 -0800 (PST) Received: from P-NTS-Evian.home (2a01cb05949d5800e3ef2d7a4131071f.ipv6.abo.wanadoo.fr. [2a01:cb05:949d:5800:e3ef:2d7a:4131:71f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8ac97fsm46899397f8f.92.2025.01.06.02.12.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 02:12:41 -0800 (PST) From: Romain Naour To: meta-arm@lists.yoctoproject.org Cc: Romain Naour , Denys Dmytriyenko , Jon Mason Subject: [scarthgap PATCH 1/7] external-arm-toolchain: remove old sed fixup for libc.so Date: Mon, 6 Jan 2025 11:12:32 +0100 Message-ID: <20250106101238.982418-2-romain.naour@smile.fr> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250106101238.982418-1-romain.naour@smile.fr> References: <20250106101238.982418-1-romain.naour@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Jan 2025 10:12:51 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/6304 As reported by Vasyl Vavrychuk [1], /${EAT_LIBDIR}/${EAT_TARGET_SYS} is not present in libc.so in the latest prebuilt toolchains: ARM32: $ cat ./gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/arm-linux-gnueabihf/libc/usr/lib/libc.so OUTPUT_FORMAT(elf32-littlearm) GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-armhf.so.3 ) ) $ cat ./gcc-arm-9.2-2019.12-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/libc/usr/lib/libc.so OUTPUT_FORMAT(elf32-littlearm) GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-armhf.so.3 ) ) $ cat ./arm-gnu-toolchain-12.3.rel1-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/libc/usr/lib/libc.so OUTPUT_FORMAT(elf32-littlearm) GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-armhf.so.3 ) ) $ cat ./arm-gnu-toolchain-13.3.rel1-x86_64-arm-none-linux-gnueabihf/arm-none-linux-gnueabihf/libc/usr/lib/libc.so OUTPUT_FORMAT(elf32-littlearm) GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-armhf.so.3 ) ) Aarch64: $ cat ./gcc-linaro-7.3.1-2018.05-x86_64_aarch64-linux-gnu/aarch64-linux-gnu/libc/usr/lib/libc.so OUTPUT_FORMAT(elf64-littleaarch64) GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-aarch64.so.1 ) ) $ cat ./gcc-arm-9.2-2019.12-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/libc/usr/lib64/libc.so OUTPUT_FORMAT(elf64-littleaarch64) GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-aarch64.so.1 ) ) $ cat ./arm-gnu-toolchain-12.3.rel1-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/libc/usr/lib64/libc.so OUTPUT_FORMAT(elf64-littleaarch64) GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-aarch64.so.1 ) ) $ cat ./arm-gnu-toolchain-13.3.rel1-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/libc/usr/lib64/libc.so OUTPUT_FORMAT(elf64-littleaarch64) GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-aarch64.so.1 ) ) We can safely remove old sed fixup for libc.so. [1] https://lists.yoctoproject.org/g/meta-arm/message/5565 Signed-off-by: Romain Naour Acked-by: Denys Dmytriyenko Signed-off-by: Jon Mason (cherry picked from commit 9a0451a959bdcc95986dad85555cb2757e65bea3) Signed-off-by: Romain Naour --- .../external-arm-toolchain/external-arm-toolchain.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb index 49ad7442..91714f21 100644 --- a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb @@ -205,13 +205,13 @@ do_install() { rm -rf ${D}${includedir}/rpcsvc/rquota.* if [ -f ${D}${libdir}/libc.so ];then - sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../${EAT_LIBDIR}#g" -e "s# /usr/${EAT_LIBDIR}/# /usr/lib/#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" -e "s# /${EAT_LIBDIR}/ld-linux# ../../${EAT_LIBDIR}/ld-linux#g" ${D}${libdir}/libc.so + sed -i -e "s# /usr/${EAT_LIBDIR}/# /usr/lib/#g" -e "s# /${EAT_LIBDIR}/ld-linux# ../../${EAT_LIBDIR}/ld-linux#g" ${D}${libdir}/libc.so sed -i -e "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${libdir}/libc.so sed -i -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libc.so fi if [ -f ${D}${base_libdir}/libc.so ];then - sed -i -e "s# /${EAT_LIBDIR}/${EAT_TARGET_SYS}# ../../lib#g" -e "s# /usr/${EAT_LIBDIR}/${EAT_TARGET_SYS}# .#g" -e "s# /${EAT_LIBDIR}/# /lib/#g" ${D}${base_libdir}/libc.so + sed -i -e "s# /${EAT_LIBDIR}/# /lib/#g" ${D}${base_libdir}/libc.so if [ -f ${D}${base_libdir}/libc.so.6 ]; then sed -i -e "s# /usr/${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" -e "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${base_libdir}/libc.so.6 fi From patchwork Mon Jan 6 10:12:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 55054 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 21CE7E7719F for ; Mon, 6 Jan 2025 10:12:51 +0000 (UTC) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.groups.io with SMTP id smtpd.web10.56580.1736158364039417227 for ; Mon, 06 Jan 2025 02:12:44 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=2rQl0Ipj; spf=pass (domain: smile.fr, ip: 209.85.128.49, mailfrom: romain.naour@smile.fr) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-436ce2ab251so15871215e9.1 for ; Mon, 06 Jan 2025 02:12:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1736158362; x=1736763162; darn=lists.yoctoproject.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; bh=EcWHEFoLC5em3YcHj+AH0HVD6/vl8D0A9xSe6wtZDdw=; b=2rQl0Ipj+lOBkH88FVpCqoYO5Wvhy8XTQQKeZJc2ls5OxD9wdacmknFAybnQWWVnN8 UopNL9O6Sv9WRlmrIp1nP5JMSw9w2y7LqmxO6vrgVbIq8oUX8h7VOkYvEStE4dr6wz1w j/VxXOf1b3Y6ICl8vgEMR1ZIPOp9ImegauoWA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736158362; x=1736763162; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EcWHEFoLC5em3YcHj+AH0HVD6/vl8D0A9xSe6wtZDdw=; b=qi7FF/2wfoDASBvNM+lRHhVY4xrqFNfqZ68bkbAoA5TAczwO8KpAT2Et7O1+S+LTcs C5GVAsQKqEr7ZNr5HRGarkXTZnXqldKS+FNN1vLD7E7lTRBfZOxgULyHbrPjUdmsXMpD U6CY/yoDNcTy+PMWuu02vQBhC8TD6WttpWtNi9n2V3iyIrGuYcqXoBs5FmyEMi45T9kF 1mKS+VmkZMFcsQAL3eip/o42ZFTtE9BGtpPOjPtWUflOa3161lifsNd9vYf7pL7f4jBy 2p5mspQbROlNDvMbDzAOZo7xrzVHirEEEahUX7VheKXas+VSNZ/3OlFjMOUESPyXOAEP kndw== X-Gm-Message-State: AOJu0YzGIUC9sUfIVnC0pVMOtmNy06u1kEDSJiEmA1xw6fZB6rF6Whfz dcX6JFbr3UjS89t5AJcBeGVqfWqhx7YAJ2MWhKKpyghw2pYJDRs8slpWMX44DMFpMYS9E0qJCtC B X-Gm-Gg: ASbGncsJO158tfk3c4HudLbMDt54mr+EQbiZwLRpk+XpMVgLnD7BQtZ5KboSs6vQecH h9VIHJbwDlnGE79BUOES+QMbzKRlvmvNjQekcuSaDoa9wLaeS0D5yZbwr6KDSvuHqa9PjYgaSSY 5illatYnbMlfROu4Vpa7jSJfA+PSMjyv97b1fayJygZCjPoPlOdA+7N36L6zA7Vf2Ec9CmlDj3U XoSi/BYTL9NraVLZt5DEWoG4o3qV5d1nKoxfspAL8ffMLB5LRwnmrD9KG33cc7o1+R/dvYoIAR/ F7pAqz6Mpr4wqZUX6qVHIcmM+QRkpCGmdM+/GvcBUp0TKchH4Y3Lfw== X-Google-Smtp-Source: AGHT+IH/Sc63god/USO+lf05K5aZFUjMRYXmERUrGQu+CdsccJsRksQn1l1ZZQ4HZOAR4IM+PYv0zQ== X-Received: by 2002:a5d:5e09:0:b0:385:f092:e00 with SMTP id ffacd0b85a97d-38a223fd2bdmr49222085f8f.50.1736158362500; Mon, 06 Jan 2025 02:12:42 -0800 (PST) Received: from P-NTS-Evian.home (2a01cb05949d5800e3ef2d7a4131071f.ipv6.abo.wanadoo.fr. [2a01:cb05:949d:5800:e3ef:2d7a:4131:71f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8ac97fsm46899397f8f.92.2025.01.06.02.12.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 02:12:42 -0800 (PST) From: Romain Naour To: meta-arm@lists.yoctoproject.org Cc: Vasyl Vavrychuk , Denys Dmytriyenko , Romain Naour , Jon Mason Subject: [scarthgap PATCH 2/7] external-arm-toolchain: wrap base_libdir vs libdir manipulations under usrmerge check Date: Mon, 6 Jan 2025 11:12:33 +0100 Message-ID: <20250106101238.982418-3-romain.naour@smile.fr> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250106101238.982418-1-romain.naour@smile.fr> References: <20250106101238.982418-1-romain.naour@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Jan 2025 10:12:51 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/6305 From: Vasyl Vavrychuk With `usrmerge` disto feature `base_libdir` and `libdir` are the same, so it does not make sense to: * removing "duplicates" between them * move files from `base_libdir` to `libdir` This fixes build error | mv: '.../tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/external-arm-toolchain/12.2.Rel1/image/usr/lib/libasan.a' and '.../tmp/work/cortexa15t2hf-neon-poky-linux-gnueabi/external-arm-toolchain/12.2.Rel1/image/usr/lib/libasan.a' are the same file in case of `usrmerge` feature enabled. Signed-off-by: Vasyl Vavrychuk Acked-by: Denys Dmytriyenko Signed-off-by: Romain Naour Signed-off-by: Jon Mason (cherry picked from commit 98eea6296290b5aead0e8d9281a91fbd94c3bf4e) Signed-off-by: Romain Naour --- .../external-arm-toolchain.bb | 62 ++++++++++--------- 1 file changed, 32 insertions(+), 30 deletions(-) diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb index 91714f21..0250ea9e 100644 --- a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb @@ -135,37 +135,39 @@ do_install() { ln -sf ../../lib/libm.so.6 ${D}${libdir}/libm.so ln -sf ../../lib/libc_malloc_debug.so.0 ${D}${libdir}/libc_malloc_debug.so - # remove potential .so duplicates from base_libdir - # for all symlinks created above in libdir - rm -f ${D}${base_libdir}/librt.so - rm -f ${D}${base_libdir}/libcrypt.so - rm -f ${D}${base_libdir}/libresolv.so - rm -f ${D}${base_libdir}/libnss_hesiod.so - rm -f ${D}${base_libdir}/libutil.so - rm -f ${D}${base_libdir}/libBrokenLocale.so - rm -f ${D}${base_libdir}/libpthread.so - rm -f ${D}${base_libdir}/libthread_db.so - rm -f ${D}${base_libdir}/libanl.so - rm -f ${D}${base_libdir}/libdl.so - rm -f ${D}${base_libdir}/libnss_db.so - rm -f ${D}${base_libdir}/libnss_dns.so - rm -f ${D}${base_libdir}/libnss_files.so - rm -f ${D}${base_libdir}/libnss_compat.so - rm -f ${D}${base_libdir}/libm.so - - # Move these completely to ${libdir} and delete duplicates in ${base_libdir} - for lib in asan hwasan atomic gfortran gomp itm lsan sanitizer stdc++ tsan ubsan; do - if [ -e ${D}${base_libdir}/lib${lib}.spec ] ; then - mv ${D}${base_libdir}/lib${lib}.spec ${D}${libdir} - fi - if [ -e ${D}${base_libdir}/lib${lib}.a ] ; then - mv ${D}${base_libdir}/lib${lib}.a ${D}${libdir} - fi - rm -f ${D}${base_libdir}/lib${lib}* - done + if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'false', 'true', d)}; then + # remove potential .so duplicates from base_libdir + # for all symlinks created above in libdir + rm -f ${D}${base_libdir}/librt.so + rm -f ${D}${base_libdir}/libcrypt.so + rm -f ${D}${base_libdir}/libresolv.so + rm -f ${D}${base_libdir}/libnss_hesiod.so + rm -f ${D}${base_libdir}/libutil.so + rm -f ${D}${base_libdir}/libBrokenLocale.so + rm -f ${D}${base_libdir}/libpthread.so + rm -f ${D}${base_libdir}/libthread_db.so + rm -f ${D}${base_libdir}/libanl.so + rm -f ${D}${base_libdir}/libdl.so + rm -f ${D}${base_libdir}/libnss_db.so + rm -f ${D}${base_libdir}/libnss_dns.so + rm -f ${D}${base_libdir}/libnss_files.so + rm -f ${D}${base_libdir}/libnss_compat.so + rm -f ${D}${base_libdir}/libm.so + + # Move these completely to ${libdir} and delete duplicates in ${base_libdir} + for lib in asan hwasan atomic gfortran gomp itm lsan sanitizer stdc++ tsan ubsan; do + if [ -e ${D}${base_libdir}/lib${lib}.spec ] ; then + mv ${D}${base_libdir}/lib${lib}.spec ${D}${libdir} + fi + if [ -e ${D}${base_libdir}/lib${lib}.a ] ; then + mv ${D}${base_libdir}/lib${lib}.a ${D}${libdir} + fi + rm -f ${D}${base_libdir}/lib${lib}* + done - # Clean up duplicate libs that are both in base_libdir and libdir - rm -f ${D}${libdir}/libgcc* + # Clean up duplicate libs that are both in base_libdir and libdir + rm -f ${D}${libdir}/libgcc* + fi # Besides ld-${EAT_VER_LIBC}.so, other libs can have duplicates like lib*-${EAT_VER_LIBC}.so # Only remove them if both are regular files and are identical From patchwork Mon Jan 6 10:12:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 55053 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 166C1E77199 for ; Mon, 6 Jan 2025 10:12:51 +0000 (UTC) Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by mx.groups.io with SMTP id smtpd.web11.56356.1736158364792206013 for ; Mon, 06 Jan 2025 02:12:45 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=F1wxBMOu; spf=pass (domain: smile.fr, ip: 209.85.128.52, mailfrom: romain.naour@smile.fr) Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-4361815b96cso93990555e9.1 for ; Mon, 06 Jan 2025 02:12:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1736158363; x=1736763163; darn=lists.yoctoproject.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; bh=r6xJuB2RYYZIkal3L24Ez3N+NbKopysGEDhMLT3PQQ0=; b=F1wxBMOuuywpMg5zh2WJLbEWeL0JDj7u7lUgmNolxO/pCPSnU579BB6SF1/I1jVj5g sjsXfzGBRnbyNyCsxqy5QMct6ym38KfRJJ0KoSnAvSFSNYAyuhV1nni7RpgS/k+cM/6U tQJTbX+935eos6j8cJr82vVCgXXXfOyITdUM0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736158363; x=1736763163; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=r6xJuB2RYYZIkal3L24Ez3N+NbKopysGEDhMLT3PQQ0=; b=tElkcJ3n+nTIDv+HsEvEyzqSkIVuiq5IeJ4kO9yvdX2JEtqbtlZrPvIVYrn/lxVyvs RnY5zRcd9czP1Gvt58Gd1bOK2l5KxrAVY7Twp5ciiJ/Q1GkUlciIfrxr0uaU0vQicwtO QcZaeqdb4XXrj+b3syQnouDxS9eeiWecftqaVyU1ogmfE9AO9V0Tcd3HAlBHG9bmk8+C bNAAgeoPZDg8JbLmcdJj/Qg9aKwO2S30glBL3iDdwYk9FaQRSF270PSgf8OKgoeS1bJA e1HBPbwcElOMEYHC5+2m5gZKt5hLv8tZcb6yPUTBUshjzVEVD73HZvykSpUjhn/Kz5gr 0bEw== X-Gm-Message-State: AOJu0YwbJ7RN2SXF7BR6iTposRj4wGPYTgvsIJbZcdeTpUTLLM1QcUCb q1WOJJ1Kz1BiexvLSL/qHN8GpmXUT0L1fmnvMWOplUqd7oQmIKsxpqvzQhRj0fPuUjUduvriiiN T X-Gm-Gg: ASbGnctKkGsOjKiV+vXYTmWChdXJ6OHCxPad7jzsQcfUSz8Ru8oTDXBHagzPQm+9dkt nJD4s6a+DLYyPGgAVBiIV2uqHjY4IDx2SPqEH2dI/jmTQ09cV2q+PAQoXciQFe6t8pO2BrKCzCC bictBOeDToRpTXKE7ZAyVdDj4dP+M5AVTc1HT85WNTpOjCyJ7z/9tEy53GOOY7dZCoKTDSBk/vW Mmuz6cHmn3lsJV5WxOni3kvOk4/50Zg4hVfidP7WPGFzzkKu9q4zBbB5gyXUvadlVuTdXTTkLdC ev9UFvyJj/wSxU/EZp7eS6+zaIr+1xbioHPvLG/LPan3Udy1zf6zug== X-Google-Smtp-Source: AGHT+IF+owJDrG0CD9COCxuj/ALfMZnwArEHIRO9O/GS2tcMs4BUUICpli7Lgxn2KsoLtnX3M3q68g== X-Received: by 2002:a5d:5e09:0:b0:385:e38f:8cc with SMTP id ffacd0b85a97d-38a223ffa1emr47038012f8f.38.1736158363057; Mon, 06 Jan 2025 02:12:43 -0800 (PST) Received: from P-NTS-Evian.home (2a01cb05949d5800e3ef2d7a4131071f.ipv6.abo.wanadoo.fr. [2a01:cb05:949d:5800:e3ef:2d7a:4131:71f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8ac97fsm46899397f8f.92.2025.01.06.02.12.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 02:12:42 -0800 (PST) From: Romain Naour To: meta-arm@lists.yoctoproject.org Cc: Romain Naour , "Parthiban" , Denys Dmytriyenko , Jon Mason Subject: [scarthgap PATCH 3/7] external-arm-toolchain: wrap symlink handling under usrmerge check Date: Mon, 6 Jan 2025 11:12:34 +0100 Message-ID: <20250106101238.982418-4-romain.naour@smile.fr> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250106101238.982418-1-romain.naour@smile.fr> References: <20250106101238.982418-1-romain.naour@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Jan 2025 10:12:51 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/6306 Rework the symlink handling when usermerge is enabled. Indeed, "ln -sf ../../lib/librt.so.1 ${D}${libdir}/librt.so" create a dead link with usermerge... Based on: https://lists.yoctoproject.org/g/meta-arm/message/5765 Signed-off-by: Romain Naour Cc: "Parthiban" Acked-by: Denys Dmytriyenko Signed-off-by: Jon Mason (cherry picked from commit a6f44bbb8042124abeeb4914205d6941cff7a4e8) Signed-off-by: Romain Naour --- .../external-arm-toolchain.bb | 49 +++++++++++++------ 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb index 0250ea9e..78443526 100644 --- a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb @@ -118,24 +118,25 @@ do_install() { else cp ${CP_ARGS} ${EXTERNAL_TOOLCHAIN}/${EAT_TARGET_SYS}/libc/lib/${linker_name} ${D}${base_libdir}/ fi - ln -sf ../../lib/librt.so.1 ${D}${libdir}/librt.so - ln -sf ../../lib/libcrypt.so.1 ${D}${libdir}/libcrypt.so - ln -sf ../../lib/libresolv.so.2 ${D}${libdir}/libresolv.so - ln -sf ../../lib/libnss_hesiod.so.2 ${D}${libdir}/libnss_hesiod.so - ln -sf ../../lib/libutil.so.1 ${D}${libdir}/libutil.so - ln -sf ../../lib/libBrokenLocale.so.1 ${D}${libdir}/libBrokenLocale.so - ln -sf ../../lib/libpthread.so.0 ${D}${libdir}/libpthread.so - ln -sf ../../lib/libthread_db.so.1 ${D}${libdir}/libthread_db.so - ln -sf ../../lib/libanl.so.1 ${D}${libdir}/libanl.so - ln -sf ../../lib/libdl.so.2 ${D}${libdir}/libdl.so - ln -sf ../../lib/libnss_db.so.2 ${D}${libdir}/libnss_db.so - ln -sf ../../lib/libnss_dns.so.2 ${D}${libdir}/libnss_dns.so - ln -sf ../../lib/libnss_files.so.2 ${D}${libdir}/libnss_files.so - ln -sf ../../lib/libnss_compat.so.2 ${D}${libdir}/libnss_compat.so - ln -sf ../../lib/libm.so.6 ${D}${libdir}/libm.so - ln -sf ../../lib/libc_malloc_debug.so.0 ${D}${libdir}/libc_malloc_debug.so if ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 'false', 'true', d)}; then + ln -sf ../../lib/librt.so.1 ${D}${libdir}/librt.so + ln -sf ../../lib/libcrypt.so.1 ${D}${libdir}/libcrypt.so + ln -sf ../../lib/libresolv.so.2 ${D}${libdir}/libresolv.so + ln -sf ../../lib/libnss_hesiod.so.2 ${D}${libdir}/libnss_hesiod.so + ln -sf ../../lib/libutil.so.1 ${D}${libdir}/libutil.so + ln -sf ../../lib/libBrokenLocale.so.1 ${D}${libdir}/libBrokenLocale.so + ln -sf ../../lib/libpthread.so.0 ${D}${libdir}/libpthread.so + ln -sf ../../lib/libthread_db.so.1 ${D}${libdir}/libthread_db.so + ln -sf ../../lib/libanl.so.1 ${D}${libdir}/libanl.so + ln -sf ../../lib/libdl.so.2 ${D}${libdir}/libdl.so + ln -sf ../../lib/libnss_db.so.2 ${D}${libdir}/libnss_db.so + ln -sf ../../lib/libnss_dns.so.2 ${D}${libdir}/libnss_dns.so + ln -sf ../../lib/libnss_files.so.2 ${D}${libdir}/libnss_files.so + ln -sf ../../lib/libnss_compat.so.2 ${D}${libdir}/libnss_compat.so + ln -sf ../../lib/libm.so.6 ${D}${libdir}/libm.so + ln -sf ../../lib/libc_malloc_debug.so.0 ${D}${libdir}/libc_malloc_debug.so + # remove potential .so duplicates from base_libdir # for all symlinks created above in libdir rm -f ${D}${base_libdir}/librt.so @@ -167,6 +168,22 @@ do_install() { # Clean up duplicate libs that are both in base_libdir and libdir rm -f ${D}${libdir}/libgcc* + else + ln -sf libcrypt.so.1 ${D}${libdir}/libcrypt.so + ln -sf libresolv.so.2 ${D}${libdir}/libresolv.so + ln -sf libnss_hesiod.so.2 ${D}${libdir}/libnss_hesiod.so + ln -sf libutil.so.1 ${D}${libdir}/libutil.so + ln -sf libBrokenLocale.so.1 ${D}${libdir}/libBrokenLocale.so + ln -sf libpthread.so.0 ${D}${libdir}/libpthread.so + ln -sf libthread_db.so.1 ${D}${libdir}/libthread_db.so + ln -sf libanl.so.1 ${D}${libdir}/libanl.so + ln -sf libdl.so.2 ${D}${libdir}/libdl.so + ln -sf libnss_db.so.2 ${D}${libdir}/libnss_db.so + ln -sf libnss_dns.so.2 ${D}${libdir}/libnss_dns.so + ln -sf libnss_files.so.2 ${D}${libdir}/libnss_files.so + ln -sf libnss_compat.so.2 ${D}${libdir}/libnss_compat.so + ln -sf libm.so.6 ${D}${libdir}/libm.so + ln -sf libc_malloc_debug.so.0 ${D}${libdir}/libc_malloc_debug.so fi # Besides ld-${EAT_VER_LIBC}.so, other libs can have duplicates like lib*-${EAT_VER_LIBC}.so From patchwork Mon Jan 6 10:12:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 55050 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0999EE7719B for ; Mon, 6 Jan 2025 10:12:51 +0000 (UTC) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.groups.io with SMTP id smtpd.web10.56581.1736158365190383830 for ; Mon, 06 Jan 2025 02:12:45 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=3MRQPlgd; spf=pass (domain: smile.fr, ip: 209.85.128.49, mailfrom: romain.naour@smile.fr) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-43675b1155bso134172745e9.2 for ; Mon, 06 Jan 2025 02:12:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1736158363; x=1736763163; darn=lists.yoctoproject.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; bh=7zFONjqPg+/SfIqYdaQMfT6VfOPnqZcA0pwUPy0rBDg=; b=3MRQPlgdp0HSRHUrNMtO9WkNmXxKvi8avdi2j8ESr9pCC8yP1tMsYRDWwCJcnmTDze 9Kd0ucGso47u/DzFrLpPptYr0luEPbHZ+GRqiI6Zey1VP88gBA4sJEjo6hGIU1uW+ehw yJaVMbcmKHXl3rqj5UMHOcNiY4ZqNQKJPInKs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736158363; x=1736763163; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=7zFONjqPg+/SfIqYdaQMfT6VfOPnqZcA0pwUPy0rBDg=; b=lM8j1ytpKSIYrVeyELTNIOmu/UR6d8mz6gJ6nJsk5KEYrmPBIhaN4m+eRw94wO9Dq9 fQPD3rN4dKlcAj3awynjKjH1ffFVSrjMX5q7sExygjcG7BYLmEVz1iccv3bptCjNt26K 0dl3yeQNhzM5WVqHzBAdh+0ybR7HjZaw9Eo1S5VprJf/D99IgdjQXlpN1SaA5SGWEjMv kcfVsbsBka9dLaWeOCvt7LpVclOP4KdTRzzivOeywO5vk8f1KK6XJw9Vr2Y2z8UdjHcx rTOTYhCtnXU3t/tbCEmKpgOvnMeuyxDnm3rP3McRdITey+R99fKDuaEUQT0FvSPtvka5 DvmQ== X-Gm-Message-State: AOJu0YwZW/hw95lBWawR5wmYLuC8F6gJ34mtEc/ZoDfIsoRsTOtoc0zk HAlDoPx2rYhv3OoZs0W/n5x2PNfKzwJEgDsTpLMCTAnvST1xHbH4fL4jlCCN+8NpaduSzfCjVro K X-Gm-Gg: ASbGncvSvUER/+yFMwphpJIgKF5X6lVlhmAPx2rDKJmkRIX+RJYsb0fljOHYEQvqhnM nW5/dTdilzG8s1nL46CLenT7QbPfb3PkkydMOh951HgC43bfqZavJ279K6rkliaj6MIxfPUDJ6h xvKPqN1zgq7a4/cHZutni0IDm3j8AnLtZIFK4mxXjxUsNAa+JDdDBKU/eoE+cZQN3la/5D3vpsh 13GiQT18F9kc0rZxO0gMiM8HXKla/bdw1+opxPpnM7VIeQqw2bhSB3m40W0Wm9wQFXMMGlZbvi2 9gYN9V7Mr/m1X3MUKa4sTpNfktuO9fTr8+g//Y8lmQEoa8Dbn5Wlkg== X-Google-Smtp-Source: AGHT+IEZcgppkNBTlaizwwc4FYq/J14CDpYZs0nwI6owCKhBz9YbC7ZKBSliBnzxRVK84ZW179DbHQ== X-Received: by 2002:a5d:64c8:0:b0:385:ec8d:8ca9 with SMTP id ffacd0b85a97d-38a223f5c0dmr43786869f8f.42.1736158363631; Mon, 06 Jan 2025 02:12:43 -0800 (PST) Received: from P-NTS-Evian.home (2a01cb05949d5800e3ef2d7a4131071f.ipv6.abo.wanadoo.fr. [2a01:cb05:949d:5800:e3ef:2d7a:4131:71f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8ac97fsm46899397f8f.92.2025.01.06.02.12.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 02:12:43 -0800 (PST) From: Romain Naour To: meta-arm@lists.yoctoproject.org Cc: Vasyl Vavrychuk , Romain Naour , Denys Dmytriyenko , Jon Mason Subject: [scarthgap PATCH 4/7] external-arm-toolchain: in libc.so GNU ld script use base_libdir Date: Mon, 6 Jan 2025 11:12:35 +0100 Message-ID: <20250106101238.982418-5-romain.naour@smile.fr> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250106101238.982418-1-romain.naour@smile.fr> References: <20250106101238.982418-1-romain.naour@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Jan 2025 10:12:51 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/6307 From: Vasyl Vavrychuk `base_libdir` gets replaced with `/lib` or `/usr/lib` depending on `usrmerge` distro feature. Signed-off-by: Vasyl Vavrychuk Signed-off-by: Romain Naour Acked-by: Denys Dmytriyenko Signed-off-by: Jon Mason (cherry picked from commit 4b2cef379f94026d275e8455d1da17c29c8f9042) Signed-off-by: Romain Naour --- .../external-arm-toolchain/external-arm-toolchain.bb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb index 78443526..cfadf248 100644 --- a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb @@ -224,9 +224,9 @@ do_install() { rm -rf ${D}${includedir}/rpcsvc/rquota.* if [ -f ${D}${libdir}/libc.so ];then - sed -i -e "s# /usr/${EAT_LIBDIR}/# /usr/lib/#g" -e "s# /${EAT_LIBDIR}/ld-linux# ../../${EAT_LIBDIR}/ld-linux#g" ${D}${libdir}/libc.so + sed -i -e "s# /usr/${EAT_LIBDIR}/# /usr/lib/#g" -e "s# /${EAT_LIBDIR}/ld-linux# ../../${base_libdir}/ld-linux#g" ${D}${libdir}/libc.so sed -i -e "s# /${EAT_LIBDIR}/libc.so.6# /lib/libc.so.6#g" ${D}${libdir}/libc.so - sed -i -e "s# /lib# ../../lib#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libc.so + sed -i -e "s# /lib# ../../${base_libdir}#g" -e "s# /usr/lib# .#g" ${D}${libdir}/libc.so fi if [ -f ${D}${base_libdir}/libc.so ];then From patchwork Mon Jan 6 10:12:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 55049 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 09AAFE7719C for ; Mon, 6 Jan 2025 10:12:51 +0000 (UTC) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mx.groups.io with SMTP id smtpd.web11.56357.1736158365874043829 for ; Mon, 06 Jan 2025 02:12:46 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=ExtJ6Eo6; spf=pass (domain: smile.fr, ip: 209.85.128.50, mailfrom: romain.naour@smile.fr) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4363dc916ceso88086505e9.0 for ; Mon, 06 Jan 2025 02:12:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1736158364; x=1736763164; darn=lists.yoctoproject.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; bh=jKUL3BFXcZpJR7ko1ERAnF2ItvYKsBlb+ApF6FB5I0w=; b=ExtJ6Eo62iWA9YoBmaCGi294LgpN0zx+rl2uE1C459LU/OWcyfNp+Kzp/wmzJQ1D7U Maudk08tOAVglqCu2yBxnYIaRSUw5NfZNP4SbR0+QxQE2iIUMKUdCSKor8JA7uFiYIxY R1sAKDTbB8spK7Z5o8+8tjNhwFDyLdpMtG5ww= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736158364; x=1736763164; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jKUL3BFXcZpJR7ko1ERAnF2ItvYKsBlb+ApF6FB5I0w=; b=O1abDisxE0T/a0joEyWaNTXZY5gyW+3+APn18BIDGp/1/rZAGR7YM840GPlUbm86km fWzsQ4O8C2WkTtnqNvbq/melYBnZgu/tsti5lyRRVPImNHpviCeKsnQKZdnVkGTctyyW 9+sp225MjCCqTwXGCsmdr8KLkifXA6VeHAcBL5MRhCiZ2bq1kDb1npFoRGjtO071wW4n 9QaliCDHdFvlxxXaH137VuEtue5n1s9gRQZd0zOUfoTNBjjL9ksvXQRPqW79sHX28Mgn GROqV6lKWP7XUGsQzcgW4gA3JYbz0gZwb7IsjYQPTcNoCSnhpq44XXjlF76UXgPXsWJB AbNA== X-Gm-Message-State: AOJu0Yy93K2sNFr2nyJ6fUlJqE91tVLAYxm5RXtkJAJe+4sZQtxplTGo LVNAbbF5Mtq9Yj2l3SYlG9yBA2k6f7Cm+xEC4AhfXOvEpzrfCkTC6Fz5qLjT/iGo0gZrsL9ozUi d X-Gm-Gg: ASbGnct21PK0KJ6SDvGD1CVbIxHSregLuRbntZpdeKNxzHFkNkWxJO5x81qo0SV41kk gGas0sC3xFYmK9fTFwrFoHKlwBW2QKbV5e8+z4XJUygLUss2DBHJ7hWA1Rt4mCeC+RFMd8UoKi6 5sEf7SSxYnaVkQjeC9dtBB+wlY7vFhecqWdotAa8vpivQVJHrGQb1U2osMa+b4EG36TXFn78eKA DG7bz21WcS7TglOKFOYPvDjQ88Zdr34OOsV6rVThBUKejlPmI397NuI4AQxpf8bsvHggdAsM+Ll 1gYOlNgM/XPlQ1ZhCmmxotmUzXguA7L8JIb5fhdPnxrzcfEd4kRODA== X-Google-Smtp-Source: AGHT+IEBx4yO5SrKmMImZCdfN6UmoidkHTLDrMsHCCljx2OY9J4pnN/9rNOqg60q2wE3PlQ1I4eMNQ== X-Received: by 2002:a5d:6d8e:0:b0:386:3958:2ec5 with SMTP id ffacd0b85a97d-38a1a2749f8mr52610229f8f.28.1736158364249; Mon, 06 Jan 2025 02:12:44 -0800 (PST) Received: from P-NTS-Evian.home (2a01cb05949d5800e3ef2d7a4131071f.ipv6.abo.wanadoo.fr. [2a01:cb05:949d:5800:e3ef:2d7a:4131:71f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8ac97fsm46899397f8f.92.2025.01.06.02.12.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 02:12:43 -0800 (PST) From: Romain Naour To: meta-arm@lists.yoctoproject.org Cc: Vasyl Vavrychuk , Denys Dmytriyenko , Romain Naour , Jon Mason Subject: [scarthgap PATCH 5/7] external-arm-toolchain: remove ${base_libdir}/libpthread*.so from FILES:${PN} Date: Mon, 6 Jan 2025 11:12:36 +0100 Message-ID: <20250106101238.982418-6-romain.naour@smile.fr> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250106101238.982418-1-romain.naour@smile.fr> References: <20250106101238.982418-1-romain.naour@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Jan 2025 10:12:51 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/6308 From: Vasyl Vavrychuk When `usrmerge` distro feature is not enabled, then `${base_libdir}` resolves to `/lib` and `/lib/libpthread*.so` does not match any files. But, with `usrmerge` distro feature, `${base_libdir}` is `/usr/lib`, so removed line leads to `/usr/lib/libpthread.so` symlink included in `${PN}` which causes QA check failure. Signed-off-by: Vasyl Vavrychuk Acked-by: Denys Dmytriyenko Signed-off-by: Romain Naour Signed-off-by: Jon Mason (cherry picked from commit 8634bdc2f21e1b2801435ecc7b6f7aacde8a7a00) Signed-off-by: Romain Naour --- .../external-arm-toolchain/external-arm-toolchain.bb | 1 - 1 file changed, 1 deletion(-) diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb index cfadf248..4776b7f8 100644 --- a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb @@ -546,7 +546,6 @@ FILES:${PN} += "\ ${base_libdir}/ld*.so.* \ ${base_libdir}/ld-*.so \ ${base_libdir}/libpthread*.so.* \ - ${base_libdir}/libpthread*.so \ ${base_libdir}/libpthread-*.so \ ${base_libdir}/libresolv*.so.* \ ${base_libdir}/libresolv-*.so \ From patchwork Mon Jan 6 10:12:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 55048 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1845E7719A for ; Mon, 6 Jan 2025 10:12:50 +0000 (UTC) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) by mx.groups.io with SMTP id smtpd.web10.56582.1736158366377523659 for ; Mon, 06 Jan 2025 02:12:46 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=X2OeGD7b; spf=pass (domain: smile.fr, ip: 209.85.221.51, mailfrom: romain.naour@smile.fr) Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3862d16b4f5so8734038f8f.0 for ; Mon, 06 Jan 2025 02:12:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1736158365; x=1736763165; darn=lists.yoctoproject.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; bh=B+8Ua9iLs67XN7IhVxfyTeUpX9jJ8hegzAemswbHsZU=; b=X2OeGD7bgKbXTgQAbDrd2pgIDhueqE3kXx4xJNIyHRpy1IPuh9/7UwNNv3eW3k+6OV rf1ji+zqYrJR3CK7/KWtwypIhMwltzJhHqgvPcn0M6vRGf8ODBIahvf7fzsDzX0abgiw Du90B+dkxDayIU3z0djnsPdNH2wnc+wK0ElUY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736158365; x=1736763165; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=B+8Ua9iLs67XN7IhVxfyTeUpX9jJ8hegzAemswbHsZU=; b=W75V5WmVjXcWjSUAYVRmeopzjdbxvU0kZuCckV7SNRxFgGdmWukWrzRrIf0bNNyxqP MC0JaSSEa5hGFIgBQ/68wir6O5KLuSzGHdFO/3Qo8dbM8hwuKE0LGN3DFvoglIxY+MFV JKQoQIRDfIs2ameCCrTtx1sWcbpAFv3DpTUi8dPANyVHzoriP7mKFBGhZcXcNT/zhSTQ esH6WMjiC3fwT/Sv1CnTQGq/oJla5Rx8rkMmiIqdM/f0QADPaA3/xeJlghOdrmvCbJtM MQ3YnyoCHD2feCPHSOOZ1vnJ6Mo6KxAR8d5sCBsjDun4K7Y2KLxPJ44llLdREbW/ZvXy bsqg== X-Gm-Message-State: AOJu0YwFUiNLddgWARlQdzyriKuJJzu7LfyhswmxpNwHFIWVhHptVvHY 2WQknwaxRegFj1W96HJwM8J+bOxyr8WfIftRKJa5qUcCwU+qiyy/0K0S1M485THlL+rqtPMFVwJ Z X-Gm-Gg: ASbGncsz+MvvDpUIgtsAytW35qRDvLFZTRdGlGFUffdPUq9c5tkyfE8Wkv5T6XlTOEK jpLLQQqGjMVLgkV9+RbWkob9i8m1X2BdMyxMqKFai4SS25CgHjoEd+q8TMspgvdlp4t1bnk6lzu qJjpAgOMbYTPZujDs4jnj4Dh2Ky7glm0p9S+kczY2t657xkQ/gl81sM8Bpv2DJmWvaHGQRSGUkB DhJkn3CGNCbkVUFNi+6pXfeLpf+O9y6Snaxivbh1Opn1CdNpvSpVmzMTec7BYEwuN0vuJvICOvF bptL3nLZpt5EACKy8VT7RG1n8+n76dHdD8uYbG853f2c2KWv26jHNw== X-Google-Smtp-Source: AGHT+IF0oQ2PYH4GyAK0YdDhJqDVkOpSs7IguNy66PeLW33iveXZBhHIkzefBTdj7CPPz7+83tKzXQ== X-Received: by 2002:a05:6000:156a:b0:385:f892:c8be with SMTP id ffacd0b85a97d-38a1a2648d2mr45512604f8f.23.1736158364837; Mon, 06 Jan 2025 02:12:44 -0800 (PST) Received: from P-NTS-Evian.home (2a01cb05949d5800e3ef2d7a4131071f.ipv6.abo.wanadoo.fr. [2a01:cb05:949d:5800:e3ef:2d7a:4131:71f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8ac97fsm46899397f8f.92.2025.01.06.02.12.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 02:12:44 -0800 (PST) From: Romain Naour To: meta-arm@lists.yoctoproject.org Cc: Romain Naour , Denys Dmytriyenko , Jon Mason Subject: [scarthgap PATCH 6/7] external-arm-toolchain: override dynamic loader path with usrmerge enabled Date: Mon, 6 Jan 2025 11:12:37 +0100 Message-ID: <20250106101238.982418-7-romain.naour@smile.fr> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250106101238.982418-1-romain.naour@smile.fr> References: <20250106101238.982418-1-romain.naour@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Jan 2025 10:12:50 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/6309 usrmerge nowaday required by systemd [1] but it broke external-arm-toolchain in several ways... When usrmerge is enabled, /lib is no longer part of SYSROOT_DIRS list while the prebuilt toolchain expect the dynamic loader to be placed in /lib not /usr/lib. There is no /lib directory in the per-package sysroot directory generated to build each package: [...]/build/tmp/sysroots-components/// sysroot-providers/ usr/ But the cross-compiler still generate binaries with dynamic loarder path set to "/lib/ld-linux-.so*" strings sanitycheckc_cross.exe | grep ld /lib/ld-linux-aarch64.so.1 A symlink /lib -> /usr/lib is crated in the final rootfs image. But this broke the meson-qemuwrapper used when "qemu-usermode" (MACHINE_FEATURES) is available: See [2]: do_write_config:append:class-target() { # Write out a qemu wrapper that will be used as exe_wrapper so that meson # can run target helper binaries through that. qemu_binary="${@qemu_wrapper_cmdline(d, '$STAGING_DIR_HOST', ['$STAGING_DIR_HOST/${libdir}','$STAGING_DIR_HOST/${base_libdir}'])}" It produce a runtime issue while running a meson sanity check: meson-qemuwrapper [...]/build/meson-private/sanitycheckc_cross.exe qemu-aarch64: Could not open '/lib/ld-linux-aarch64.so.1': No such file or directory Note: The binaries build by the Yocto internal toolchain seems be "patched" [3] to look at /usr/lib instead of /lib. We use -Wl,--dynamic-linker to make sure that the cross-compiler generate binaries using the dynamic loader path defined by usrmerge for all packages build by Yocto. [1] https://git.openembedded.org/openembedded-core/commit/?id=802e853eeddf16d73db1900546cc5f045d1fb7ed [2] https://git.openembedded.org/openembedded-core/tree/meta/classes-recipe/meson.bbclass?h=2024-04.3-scarthgap#n130 [3] https://github.com/openembedded/openembedded-core/blob/scarthgap/meta/recipes-devtools/gcc/gcc/0007-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch Signed-off-by: Romain Naour Acked-by: Denys Dmytriyenko Signed-off-by: Jon Mason (cherry picked from commit cb4c0c9a937046c9effdeeff2496d52866c64197) Signed-off-by: Romain Naour --- .../conf/distro/include/tcmode-external-arm.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc index 898663ea..99fe56b8 100644 --- a/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc +++ b/meta-arm-toolchain/conf/distro/include/tcmode-external-arm.inc @@ -15,6 +15,11 @@ EAT_TARGET_SYS:aarch64 ?= "${@ 'aarch64-none-linux-gnu' if os.path.exists('${EXT EAT_TARGET_SYS = "${TARGET_SYS}" TARGET_PREFIX = "${EAT_TARGET_SYS}-" +EXTERNAL_TOOLCHAIN_LIBDIR = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '/usr/lib', '/lib', d)}" +EXTERNAL_TOOLCHAIN_DYN_LINKER_PATH:arm ?= " -Wl,--dynamic-linker=${EXTERNAL_TOOLCHAIN_LIBDIR}/ld-linux-armhf.so.3" +EXTERNAL_TOOLCHAIN_DYN_LINKER_PATH:aarch64 ?= " -Wl,--dynamic-linker=${EXTERNAL_TOOLCHAIN_LIBDIR}/ld-linux-aarch64.so.1" +TARGET_LDFLAGS:append:class-target = "${EXTERNAL_TOOLCHAIN_DYN_LINKER_PATH}" + EAT_LIBDIR:arm = "lib" EAT_LIBDIR:aarch64 = "lib64" From patchwork Mon Jan 6 10:12:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Naour X-Patchwork-Id: 55051 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFE17E77198 for ; Mon, 6 Jan 2025 10:12:50 +0000 (UTC) Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) by mx.groups.io with SMTP id smtpd.web10.56583.1736158366877208258 for ; Mon, 06 Jan 2025 02:12:47 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@smile.fr header.s=google header.b=FVGCSfON; spf=pass (domain: smile.fr, ip: 209.85.128.45, mailfrom: romain.naour@smile.fr) Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-43635796b48so85388915e9.0 for ; Mon, 06 Jan 2025 02:12:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=smile.fr; s=google; t=1736158365; x=1736763165; darn=lists.yoctoproject.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; bh=D836ZJSpNvaUTatGZH8WEl9fxj/UK9v9mq28u98ybkM=; b=FVGCSfONyxRDs93QqjlKV0PO/Bshd4ExX7fMo3N+CnGjrfbcy1mh/S8hK9tondxvi1 EkghsXdVwxvTxq4ud5WQ8p3u1fqxxtq3UlofUo4z4mIsGqlMv+lotlEzw6PgQN1icKH1 EAt7fZPp3f8Nros/Dol8FwGIns4mXzJqs4TsI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736158365; x=1736763165; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=D836ZJSpNvaUTatGZH8WEl9fxj/UK9v9mq28u98ybkM=; b=izMaUJlCUi+/AJ0E27dBINi8GXLyfPCxmgTNBkKP9Ts2hWc2m+OeFolUlf9aFUSYT/ h/CKnx+6OStUDRxNICc2flekNqVrP9xeW4Bv3W9RPNYIUxzqFA632vxEr29W/vjUcKKy 9R4rNwa0RO6lBwPl5m+VIHp03Gn8J/n7L01QuuWcWM8oVkEbclTk6DaZYX5DSkQ5y/8t ojxmd1DnFy08zcrLGylFzQgMCFPzHgEZc9KebLAwAx4tyzM1Vu3rIvP3hzNX1sghq37r M+IPMnmft3Oy5duPZ0jevDKqkMo6i4+8KoRWPZaXRCc1jgdkx7b/8jYYHNsmEMDvfZJz CPPA== X-Gm-Message-State: AOJu0YyfmMRG5VLdCbA4uvdBpzEYE9OHjSZs96/9NJJordJWO9GIq2h4 FGE/YM4ySbhpL2OJ2auGxXS68ukIgCuDbAtOLj38L+YOhSxrxiRJ1u0tMplo5+/ZLCRBNcoTVOH 8 X-Gm-Gg: ASbGnctN+Ry8VC+e2s+BOcdFbDpIXHRtKeV1t2o/aZv+pgRTrHSxw2NmNFFGZBoMojj EtsjDK5/kc1DJqgfu+ShnD/+lfAzZkJCAZRJO5zGTqgag0eK0sS5EcL4oH5YftV6YLBl7aHXhoh 8uSD6/S4VAeYPTPjz8r9VDbNT6ozSgyIrApFdc9DEtJfErcN+Ol48uU8vfIvMboYGgvE0j1rto+ N0IJlZv3b4/Hlky+UtLvI+lyu38cCw81NaFTR0LSCbVdFRpKkJ8DzX5w19PUeBTMyYsCMq0Iwkz q16xSJqnbCiUjmSfysw7YpkmZKaEndhzwqpVDQYT0+d/nL3Y9w3EVw== X-Google-Smtp-Source: AGHT+IHFHmWvkckkGUgv1ipNyVBf+ScIrIVIwwCs15/TMWllt+ZLAiE4I4mf6GtJmfhEl/SvaeZTjw== X-Received: by 2002:a7b:c7cd:0:b0:434:92f8:54a8 with SMTP id 5b1f17b1804b1-4365c51e2a3mr489998415e9.0.1736158365353; Mon, 06 Jan 2025 02:12:45 -0800 (PST) Received: from P-NTS-Evian.home (2a01cb05949d5800e3ef2d7a4131071f.ipv6.abo.wanadoo.fr. [2a01:cb05:949d:5800:e3ef:2d7a:4131:71f]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38a1c8ac97fsm46899397f8f.92.2025.01.06.02.12.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jan 2025 02:12:45 -0800 (PST) From: Romain Naour To: meta-arm@lists.yoctoproject.org Cc: Romain Naour , Denys Dmytriyenko , Jon Mason Subject: [scarthgap PATCH 7/7] external-arm-toolchain: rebuild libmvec.so symlink if any Date: Mon, 6 Jan 2025 11:12:38 +0100 Message-ID: <20250106101238.982418-8-romain.naour@smile.fr> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250106101238.982418-1-romain.naour@smile.fr> References: <20250106101238.982418-1-romain.naour@smile.fr> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Mon, 06 Jan 2025 10:12:50 -0000 X-Groupsio-URL: https://lists.yoctoproject.org/g/meta-arm/message/6310 On some architectures (namely Aarch64), glibc may provide a libmvec library since glibc 2.22, which programs built with gcc OpenMP support might get linked to. In order for these programs to work on the target, we need to copy this library to the target filesystem. Make sure that libmvec.so symlink is correct with or without usermerge enabled otherwise libmvec.so symlink is broken. For more details on libmvec, see https://sourceware.org/glibc/wiki/libmvec. Signed-off-by: Romain Naour Acked-by: Denys Dmytriyenko Signed-off-by: Jon Mason (cherry picked from commit de47f836e282ad07bdaa72086a96c59e847b880b) Signed-off-by: Romain Naour --- .../external-arm-toolchain/external-arm-toolchain.bb | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb index 4776b7f8..6a03308d 100644 --- a/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb +++ b/meta-arm-toolchain/recipes-devtools/external-arm-toolchain/external-arm-toolchain.bb @@ -136,6 +136,9 @@ do_install() { ln -sf ../../lib/libnss_compat.so.2 ${D}${libdir}/libnss_compat.so ln -sf ../../lib/libm.so.6 ${D}${libdir}/libm.so ln -sf ../../lib/libc_malloc_debug.so.0 ${D}${libdir}/libc_malloc_debug.so + if [ -f ${D}${base_libdir}/libmvec.so.1 ]; then + ln -sf ../../lib/libmvec.so.1 ${D}${libdir}/libmvec.so + fi # remove potential .so duplicates from base_libdir # for all symlinks created above in libdir @@ -154,6 +157,7 @@ do_install() { rm -f ${D}${base_libdir}/libnss_files.so rm -f ${D}${base_libdir}/libnss_compat.so rm -f ${D}${base_libdir}/libm.so + rm -f ${D}${base_libdir}/libmvec.so # Move these completely to ${libdir} and delete duplicates in ${base_libdir} for lib in asan hwasan atomic gfortran gomp itm lsan sanitizer stdc++ tsan ubsan; do @@ -184,6 +188,9 @@ do_install() { ln -sf libnss_compat.so.2 ${D}${libdir}/libnss_compat.so ln -sf libm.so.6 ${D}${libdir}/libm.so ln -sf libc_malloc_debug.so.0 ${D}${libdir}/libc_malloc_debug.so + if [ -f ${D}${libdir}/libmvec.so.1 ]; then + ln -sf libmvec.so.1 ${D}${libdir}/libmvec.so + fi fi # Besides ld-${EAT_VER_LIBC}.so, other libs can have duplicates like lib*-${EAT_VER_LIBC}.so