Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 06 Feb 2023 11:13:13 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 269369] native-xtools builds for wrong target in releng/13.1
Message-ID:  <bug-269369-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269369

            Bug ID: 269369
           Summary: native-xtools builds for wrong target in releng/13.1
           Product: Base System
           Version: 13.1-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: chris@chrullrich.net

In releng/13.1 "make native-xtools" builds a toolchain that targets the hos=
t by
default, instead of TARGET/TARGET_ARCH. releng/13.0 works correctly.

Bisecting shows that the first commit that ends up with the wrong default
target is:

commit a5186406aced401de7984f8b338675da650d0e25
Author: Alex Richardson <arichardson@FreeBSD.org>
Date:   Mon Sep 6 09:49:49 2021 +0100

    Add WITH_LLVM_BINUTILS to install LLVM binutils instead of Elftoolchain

Reverting this commit as best I can did not fix the bug. Unfortunately the =
base
build system is far beyond my comprehension.


>From releng/13.1:

$ MAKEOBJDIRPREFIX=3D/usr/obj/aarch64 make -j 4 TARGET=3Darm64 TARGET_ARCH=
=3Daarch64
native-xtools
[...]
$
/usr/obj/aarch64/usr/src/amd64.amd64/nxb/arm64.aarch64/usr.bin/clang/clang/=
clang
-v
FreeBSD clang version 13.0.0 (git@github.com:llvm/llvm-project.git
llvmorg-13.0.0-0-gd7b669b3a303)
Target: x86_64-unknown-freebsd13.1
Thread model: posix
InstalledDir:
/usr/obj/aarch64/usr/src/amd64.amd64/nxb/arm64.aarch64/usr.bin/clang/clang


>From releng/13.0:

$ MAKEOBJDIRPREFIX=3D/usr/obj/aarch64 make -j 4 TARGET=3Darm64 TARGET_ARCH=
=3Daarch64
native-xtools
[...]
$
/usr/obj/aarch64/usr/src/amd64.amd64/nxb/arm64.aarch64/usr.bin/clang/clang/=
clang
-v
FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git
llvmorg-11.0.1-0-g43ff75f2c3fe)
Target: aarch64-unknown-freebsd13.0
Thread model: posix
InstalledDir:
/usr/obj/aarch64/usr/src/amd64.amd64/nxb/arm64.aarch64/usr.bin/clang/clang


I have -j4 build logs from both. If they are needed, please let me know whe=
re
to put them (~43 MiB total), and whether I should recreate them without -j,=
 or
with any additional options. The most obvious difference is that the working
(13.0) build has ~3600 more lines in "stage 3: cross tools" and about as ma=
ny
fewer in "stage 4.2: building libraries" than the broken one.


$ egrep -v "^($|#)" /etc/make.conf /etc/src.conf /etc/src-env.conf
/etc/make.conf:CFLAGS=3D         -O -pipe
/etc/make.conf:WRKDIRPREFIX=3D   /tmp/portbuild
/etc/make.conf:DEPENDS_TARGET=3D package
/etc/make.conf:KERNCONF=3D       LOCAL
/etc/make.conf:DEVELOPER=3D      1
/etc/make.conf:KRB5_HOME=3D      /usr/local
/etc/make.conf:.if ("${TARGET}" =3D=3D "amd64")
/etc/make.conf:.endif
/etc/make.conf:WITH_CCACHE_BUILD=3Dyes
/etc/make.conf:WITH_BDB6_PERMITTED=3Dyes
/etc/src.conf:WITH_CCACHE_BUILD=3Dtrue
/etc/src.conf:CCACHE_DIR=3D/var/cache/ccache
/etc/src.conf:CCACHE_UMASK=3D002
/etc/src.conf:WITHOUT_TESTS=3Dyes
/etc/src.conf:WITHOUT_KERBEROS=3Dyes
/etc/src.conf:WITHOUT_LIB32=3Dyes
egrep: /etc/src-env.conf: No such file or directory

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-269369-227>