We configure the build system with --program-suffix=-r8459
, for example like so:
./configure --program-suffix=-r8459 --datarootdir=/usr/local/share/sdcc-r8459 --disable-various-ports-here
We build, install and then we try to build something:
$ sdcc-r8459 -V foo.c + /usr/local/bin/sdcpp -nostdinc -Wall -obj-ext=.rel -D__SDCC_MODEL_SMALL -DSDCC_MODEL_SMALL -D__SDCC_FLOAT_REENT -DSDCC_FLOAT_REENT -D__SDCC=3_2_1 -DSDCC=321 -D__SDCC_REVISION=8457 -DSDCC_REVISION=8457 -D__SDCC_mcs51 -DSDCC_mcs51 -D__mcs51 -D__STDC_NO_COMPLEX__ -D__STDC_NO_THREADS__ -D__STDC_NO_ATOMICS__ -D__STDC_NO_VLA__ -isystem /usr/local/bin/../share/sdcc-r8459/sdcc/include/mcs51 -isystem /usr/local/share/sdcc-r8459/sdcc/include/mcs51 -isystem /usr/local/bin/../share/sdcc-r8459/sdcc/include -isystem /usr/local/share/sdcc-r8459/sdcc/include foo.c + /usr/local/bin/sdas8051 -plosgffw foo.rel foo.asm + /usr/local/bin/sdld -nf foo.lk
Intermedate stages call sdcpp
, sdas8051
, sdld
when it should be taking --program-prefix
into account and call sdcpp-SUFFIX
etc
The same behaviour may (or may not) also be present for --program-prefix=PREFIX
, --program-transform-name=SEDPROGRAM
. These two have not been tested.
This was observed with rev #8457 on OS X and with #8459 on Ubuntu
This was discussed briefly in this thread:
http://sourceforge.net/mailarchive/message.php?msg_id=30632562
May I suggest not to try to support --program-transform-name at all? IMHO prefix and suffix are useful enough.
From my part, I can't think of any use cases that would require --program-transform-name. It feels to me that prefixes and suffixes should be sufficient.
Fixed in reversion #9205. Now the specified prefix and suffix are both appended to sdcc's components.
Hi Ben,
Are you sure this got fixed in a proper way? I briefly looked at your
changes and you seem to always expect a .exe extension which I believe is
not present on any OS but Windows.
Further, I wonder if parsing argv[0] is the way to go. What if it contains
spaces in the name or path? Maybe it's better to just put the configured
prefix and postfix in a global constant at compile time and assemble the
names from that?
Maarten