Menu

#2146 Calls to cpp, assembler, linker ignore --program-suffix build config

closed-fixed
Ben Shi
None
Build
5
2015-04-02
2013-03-22
No

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

Discussion

  • Maarten Brock

    Maarten Brock - 2013-12-19

    May I suggest not to try to support --program-transform-name at all? IMHO prefix and suffix are useful enough.

     
  • George Oikonomou

    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.

     
  • Ben Shi

    Ben Shi - 2015-04-02

    Fixed in reversion #9205. Now the specified prefix and suffix are both appended to sdcc's components.

     
  • Ben Shi

    Ben Shi - 2015-04-02
    • status: open --> closed-fixed
    • assigned_to: Ben Shi
     
  • Maarten Brock

    Maarten Brock - 2015-04-02

    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

    • status: open --> closed-fixed
    • assigned_to: Ben Shi
    • Comment:

    Fixed in reversion #9205. Now the specified prefix and suffix are both
    appended to sdcc's components.

     

Log in to post a comment.