Adding arduino-core-avr, which is the same feature hitting a non-OS target, but through a different path than ntldd/rhsrvany:
arduino-core-avr 1.8.7+dfsg-1 fails building the atmega8 bootloader: /usr/lib/avr/bin/ld: ATmegaBOOT.elf section `.note.package' will not fit in region `text' /usr/lib/avr/bin/ld: region `text' overflowed by 82 bytes https://launchpad.net/ubuntu/+source/arduino-core- avr/1.8.7+dfsg-1/+build/32793370 The bootloader Makefiles override LDFLAGS, so --package-metadata isn't passed. The note comes from the ELF_PACKAGE_METADATA environment variable instead: dpkg-buildpackage.pl always exports it (if not already set), and avr-gcc picks it up. Reproduced in a stonking chroot with avr- gcc 16.2: the bootloader overflows with ELF_PACKAGE_METADATA set and fits (982 bytes) without it. Note this means qa=-elfpackagemetadata in DEB_BUILD_MAINT_OPTIONS isn't enough as an opt-out: it only drops the LDFLAGS part, while the environment variable is still exported. Any fix in dpkg should probably cover both (don't export ELF_PACKAGE_METADATA when the feature is disabled), and packages building firmware or non-ELF targets currently need to unexport it themselves. Workaround prepared for arduino-core-avr: "unexport ELF_PACKAGE_METADATA" in debian/rules (1.8.7+dfsg-1ubuntu1), test-built fine. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/2170637 Title: dpkg-buildflags: --package-metadata in default LDFLAGS breaks non-ELF (mingw) builds (ntldd, rhsrvany) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/arduino-core-avr/+bug/2170637/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
