When I try to build SDCC for mcs51 only some disable options are not working properly.
./configure -q \
--disable-z80-port \
--disable-z180-port \
--disable-r2k-port \
--disable-r2ka-port \
--disable-r3ka-port \
--disable-sm83-port \
--disable-tlcs-port \
--disable-tlcs90-port \ <== Have to specify both tlcs and tlcs90
--disable-ez80_z80-port \
--disable-z80n-port \
--disable-r800-port \ <== already added to Makefile.common.in, Makefile.in, sdccconf_in.h
--disable-ds390-port \
--disable-ds400-port \
--disable-pic14-port \
--disable-pic16-port \
--disable-hc08-port \
--disable-m68hc08-port \ <== Have to specify both hc08 and m68hc08
--disable-s08-port \
--disable-stm8-port \
--disable-pdk-port \ <== Have to specify both pdkNN and pdk
--disable-pdk13-port \
--disable-pdk14-port \
--disable-pdk15-port \
--disable-mos6502-port \
--disable-xa-port \ <== Not in help text
--disable-rxk-port \ <== Have to specify both rNk(a) and rxk
--disable-f8-port \ <== Not in help text
This allows make to complete, however running regression tests still fails.
$ make
....................................................................................................................
populated MakeList...
gce: gcc torture execute.. 158
m4: macro tests.. 1
qct: QuickC tests.. 108
tcc: tinycc tests.. 117
tpl: template tests.. 105
tst: plain tests.. 1476
at 1: error 131: cannot generate code for target 'ez80_z80'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'ez80_z80'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'ez80_z80'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/ez80-z80/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/ez80-z80/support.rel] Error 1
make[2]: *** [Makefile:433: gen/ez80-z80/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'r3ka'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'r3ka'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'r3ka'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/ucr3ka/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/ucr3ka/support.rel] Error 1
make[2]: *** [Makefile:433: gen/ucr3ka/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
Running mcs51-small regression tests
[...]
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/ucz80-resiy/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/ucz80-resiy/support.rel] Error 1
make[2]: *** [Makefile:433: gen/ucz80-resiy/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
Running mcs51-large regression tests
[...]
at 1: error 131: cannot generate code for target 'z180'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'z180'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'z180'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/ucz180-resiy/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/ucz180-resiy/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/ucz180-resiy/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'stm8'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'stm8'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'stm8'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/stm8/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/stm8/support.rel] Error 1
make[2]: *** [Makefile:433: gen/stm8/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'r2k'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'r2k'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'r2k'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/ucr2k/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/ucr2k/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/ucr2k/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'tlcs90'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'tlcs90'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'tlcs90'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/tlcs90/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/tlcs90/support.rel] Error 1
make[2]: *** [Makefile:433: gen/tlcs90/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'hc08'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'hc08'
Supported ports and corresponding port selection options:
at 1: error 131: cannot generate code for target 'hc08'
MCU 8051 -mmcs51
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/hc08/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/hc08/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/hc08/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'stm8'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'stm8'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'stm8'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/stm8-large/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/stm8-large/support.rel] Error 1
make[2]: *** [Makefile:433: gen/stm8-large/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'mos6502'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'mos6502'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'mos6502'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/uc6502/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/uc6502/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/uc6502/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'z80n'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'z80n'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/ucz80n/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/ucz80n/support.rel] Error 1
at 1: error 131: cannot generate code for target 'z80n'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/ucz80n/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
Running mcs51-small-stack-auto regression tests
[...]
at 1: error 131: cannot generate code for target 'r800'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'r800'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'r800'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/ucr800/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/ucr800/support.rel] Error 1
make[2]: *** [Makefile:433: gen/ucr800/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/ucz80-nmos/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/ucz80-nmos/support.rel] Error 1
make[2]: *** [Makefile:433: gen/ucz80-nmos/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
Running mcs51-large-stack-auto regression tests
[...]
at 1: error 131: cannot generate code for target 'z180'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'z180'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'z180'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/ucz180/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/ucz180/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/ucz180/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/ucz80-undoc/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/ucz80-undoc/support.rel] Error 1
make[2]: *** [Makefile:433: gen/ucz80-undoc/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'pdk15'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'pdk15'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'pdk15'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/pdk15-stack-auto/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/pdk15-stack-auto/support.rel] Error 1
make[2]: *** [Makefile:433: gen/pdk15-stack-auto/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
Running mcs51-medium regression tests
[...]
at 1: error 131: cannot generate code for target 's08'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 's08'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 's08'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/s08-stack-auto/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/s08-stack-auto/support.rel] Error 1
make[2]: *** [Makefile:433: gen/s08-stack-auto/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'r2ka'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'r2ka'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'r2ka'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/ucr2ka/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/ucr2ka/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/ucr2ka/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'sm83'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'sm83'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/ucgbz80/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
at 1: error 131: cannot generate code for target 'sm83'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:430: gen/ucgbz80/support.rel] Error 1
make[2]: *** [Makefile:433: gen/ucgbz80/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'pdk15'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'pdk15'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'pdk15'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/pdk15/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/pdk15/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/pdk15/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'ds390'
at 1: error 131: cannot generate code for target 'ds390'
Supported ports and corresponding port selection options:
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'ds390'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:430: gen/ds390/support.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/ds390/testfwk.rel] Error 1
make[2]: *** [Makefile:433: gen/ds390/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
Running host regression tests
[...]
at 1: error 131: cannot generate code for target 'pdk14'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'pdk14'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/pdk14/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:430: gen/pdk14/support.rel] Error 1
at 1: error 131: cannot generate code for target 'pdk14'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/pdk14/statics.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 'z80'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/ucz80/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/ucz80/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/ucz80/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
Running mcs51-huge regression tests
[...]
at 1: error 131: cannot generate code for target 's08'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 's08'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
at 1: error 131: cannot generate code for target 's08'
Supported ports and corresponding port selection options:
MCU 8051 -mmcs51
make[2]: *** [Makefile:433: gen/s08/testfwk.rel] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [Makefile:433: gen/s08/statics.rel] Error 1
make[2]: *** [Makefile:430: gen/s08/support.rel] Error 1
make[1]: *** [Makefile:364: test-port] Error 2
make: *** [Makefile:197: test-ports] Error 2
Is this really two issues?
The error messages you get look like the regression test infrastructure expects all ports to be enabled for your use case (plain
makewithout any argument).That
--disable-tlcs-portvs.--disable-tlcs90-portport, is it about uCsim? The only place in SDCC where I see--disable-tlcs-portused is in uCsim.AFAIK, uCsim does not support any TLCS other than the TLCS-90, so it would make sense to rename the option in uCsim. IMO, the TLCS-870 series is sufficently different from TLCS-90 that it would require a new port in uCsim anyway, and could not be handled by extending the TLCS-90 support. Even the TLCS-900, while more similar to the TLCS-90 AFAIK has a totally different instruction encoding, so it would likely needs its own port.
On the other hand, also for some other ports, uCsim uses a differently-named disable option. E.g.
--disable-hc08-portin SDCC vs.--disable-m68hc08-port.Yes, it probably is.
I definitely would prefer to need only one --disable-xxx-port to disable a target. So either these options should be renamed or the top configure script should pass the correct option to the ucsim configure script. And good catch that I overlooked hc08. The same probably goes for pdk and rxk.
Some of the options that I found were also not mentioned for
./configure --help.And indeed, when sdcc is not configured for a target, I expect to see no failure for that target when running regression tests with plain
make.Enable/disable options are not passed to uCsim configure (as far as I know). In uCsim subtree, always all simulators are compiled --that needed for regtest--, regardless of selected SDCC ports. This is a safe solution and I think it's not a bug.
Hmmm... this is very counterintuitive, and I'm wondering the reasoning.
I naively thought that for any testing (regression & otherwise), we only need to enable the simulator for the targets we intent to compile for.
I don't get why we need to be able to emulate, for example, stm8 if stm8 compilation is disabled.
What did I miss ?
No reason, really. It is up to you to disable compilation of stm8 simulator, if you don't need it. You don't have to enable it.
uCsim configure (without disable/enable options) detects if it is compiled inside of SDCC tree or standalone. Simulators (and tools) compiled by default will be selected according to situation.
Diff:
I also try to compile just stm8 & mcs51 (which are the only 2 MCU i have). It runs smoothly until the LD phase.
And then it fails with
Which version of sdcc did you try to compile? On which host system?
I've just tried current trunk
on my Debian GNU/Linux testing on amd64 system, and it compiled fine; I did not see the linker errors you reported.
thanks.
It is on my raspbian (armhf) box.
gcc/g++ version 10.2.1.
GNU ld version 2.35.2.
I didn't try on amd64, will do.
Ok, I tried on a empty chroot
gives me a missing zilb.h
Which is solved with installing
zlib1g-dev.And, then it does work correctly. False alert. Sorry!
PS : The only thing might be to eventually add a test in the configure for zlib,
The zlib configure issue is known (though I'm not familiar enough with build infrastructure to fix it): https://sourceforge.net/p/sdcc/bugs/3508/
oh. i'll look into it, as i'm more knowleageable in build systems than compilers.
thanks!
It's actually very easy. It only takes a new single line
Which configure.ac? support/sdbinutils/configure.ac? support/cpp/configure.ac? If yes to at least one of those: do you happen to know why upstream GNU binutils or GCC didn't put it into their configure.ac?
I did put it in the topmost one, as the diff implied (it is from a svn diff).
It actually doesn't do anything more than halting the configure script when zlib.h is missing, so it has minimal impact i'd say.
It is merely a courtesy of showing to the user that zlib.h is required, in the very same way that boost/graph/adjacency_list.hpp is. It doesn't offer any alternative, configurable or not.
As of why didn't GCC put it in their configure.ac, they actually did in a different way. As they have to ensure that the zlib.h is compatible, or provide their own, so their configuration is very different.
Which makes me think that we might have a misunderstanding here.
The library zlib is always present as very central to the system, so that's not the problem. The issue here is the header zlib.h is missing which comes from the dev package of zlib.
Notice that there's 2 packages. The 1rst one is always installed, but the 2nd is required to be able to compile SDCC.
Hopes it clarifies. If not, feel free to ask more.
Thanks. I made the change in [r14532].
Related
Commit: [r14532]
Awesome. thanks !
Since the sdcc from thr f8 branch has been merged to trunk, the --disbale-f8-port is in the help output. How much of this bug report still applies to current SDCC from trunk?
This is already reason for concern:
This look OK
Make fails with:
I fixed --disable-f8-port in [r14967], i.e. the SDCC part of this issue is fixed now. The "This is already reason for concern" part is from the configure script of uCsim.
Related
Commit: [r14967]
Messages from uCsim configure script are for uCsim development, do not interpret them as like SDCC messages.
[r15046]
Related
Commit: [r15046]