Source: luajit2 Version: 2.1-20230410-1 Tags: patch User: [email protected] Usertags: ftcbfs
luajit2 fails to cross build from source. Unfortunately, the nomenclature gets really confusing here, so let me clarify: Debian | luajit2 -------+-------- build | host host | target target | - Hencefore, I am assuming Debian's meaning. So luajit2 passes host flags to the build compiler. This happen both during clean (as dh_auto_clean doesn't pass cross tools yet picks up CFLAGS) and during build (because CFLAGS automatically promote to both kinds of flags). I'm attaching a patch that fixes both for your convenience. Helmut
diff --minimal -Nru luajit2-2.1-20230410/debian/changelog luajit2-2.1-20230410/debian/changelog --- luajit2-2.1-20230410/debian/changelog 2023-06-18 03:26:28.000000000 +0200 +++ luajit2-2.1-20230410/debian/changelog 2023-12-08 13:49:40.000000000 +0100 @@ -1,3 +1,10 @@ +luajit2 (2.1-20230410-1.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix FTCBFS: Be more precise about build/host/target. (Closes: #-1) + + -- Helmut Grohne <[email protected]> Fri, 08 Dec 2023 13:49:40 +0100 + luajit2 (2.1-20230410-1) unstable; urgency=medium [ Debian Janitor ] diff --minimal -Nru luajit2-2.1-20230410/debian/rules luajit2-2.1-20230410/debian/rules --- luajit2-2.1-20230410/debian/rules 2023-02-28 19:24:49.000000000 +0100 +++ luajit2-2.1-20230410/debian/rules 2023-12-08 13:49:40.000000000 +0100 @@ -10,10 +10,16 @@ %: dh $@ +override_dh_auto_clean: + dh_auto_clean -- CROSS=$(DEB_HOST_GNU_TYPE)- + override_dh_auto_build: $(MAKE) amalg PREFIX=/usr \ MULTILIB=lib/$(DEB_HOST_MULTIARCH) \ CROSS=$(DEB_HOST_GNU_TYPE)- \ + CFLAGS= \ + HOST_CFLAGS='$(CFLAGS_FOR_BUILD)' \ + TARGET_CFLAGS='$(CFLAGS)' \ Q= E=@: override_dh_auto_install:

