Created attachment 571304 [details] build.log No libsdcc.lib in pic14 port it errors on: '/var/tmp/portage/dev-embedded/sdcc-3.8.0-r1/work/sdcc-3.8.0/device/lib/pic14//../../../bin/sdcc' -DHAVE_CONFIG_H -I. -I.. -I. -I../../../include/pic14 -I../../../non-free/include/pic14 -pamd64 -mpic14 -pamd64 --no-warn-non-free --std-c99 --i-code-in-asm -c -o libm_a-acosf.o `test -f 'acosf.c' || echo './'`acosf.c 'amd64' was not found. Build from sources without portage works
It looks like problem with ARCH variable. It is modified in Makefile*.in but in Makefile.ac not.
Created attachment 571916 [details, diff] unset ARCH so build system internal variable isnt overridden The issue at build time is that "ARCH" is used internally by the sdcc build system, but -not- the way the PM uses it; as such the "amd64" ARCH set by the PM overrides what should be set by sdcc. The following unsets ARCH prior to configuring and compiling, it worked for me.
ARCH and PORTDIR are mangled in """ find \ '(' -name 'Makefile*.in' -o -name 'configure' ')' \ -exec sed -r -i \ -e 's:\<(PORTDIR|ARCH)\>:SDCC\1:g' \ {} + || die """ We need to extend it to cover to .ac file as well.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec9f33c18f0621452246ff37762a42485ad050ca commit ec9f33c18f0621452246ff37762a42485ad050ca Author: Esteve Varela Colominas <esteve.varela@gmail.com> AuthorDate: 2022-12-01 18:49:37 +0000 Commit: Viorel Munteanu <ceamac@gentoo.org> CommitDate: 2023-03-05 10:14:21 +0000 dev-embedded/sdcc: Bump to 4.2.0 This update also fixes a long-standing bug with regards to the pic14 and pic16 ports. Be sure to build with USE="pic14 pic16 non-free device-lib" (all linked bugs are a copy of this, can be closed when this package goes stable) Bug: https://bugs.gentoo.org/682086 Bug: https://bugs.gentoo.org/730484 Bug: https://bugs.gentoo.org/731848 Closes: https://bugs.gentoo.org/844925 Signed-off-by: Esteve Varela Colominas <esteve.varela@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/28496 Signed-off-by: Viorel Munteanu <ceamac@gentoo.org> dev-embedded/sdcc/Manifest | 2 + .../sdcc/files/sdcc-4.2.0-link-tinfo.patch | 24 +++ dev-embedded/sdcc/metadata.xml | 17 ++- dev-embedded/sdcc/sdcc-4.2.0.ebuild | 167 +++++++++++++++++++++ dev-embedded/sdcc/sdcc-9999.ebuild | 134 +++++++++-------- 5 files changed, 276 insertions(+), 68 deletions(-)