Menu

#3551 sdcc frontend/preprocessor: wrong destination folder for the dependency files

closed-fixed
Felix
sdcpp (4)
Front-end
5
2023-11-08
2023-02-07
Tony Pavlov
No

-MMD is not passed into the new CC1 preprocessor. it may pass from SDCC into SDCPP, but the later now require -Wp prefix to pass it into CC1, if i understand the toolchain correctly,

-MMD without -Wp prefix makes SDCPP spoil the C source file, it is trying to preprocess! zeroing the file size (already reported in #3541)

when -MMD is passed into the CC1 by means of -Wp prefix, it work, BUT, the dependency .d files do not land beside the .asm and *.o files, but land into the current directory instead, which look not correct.

version:

SDCC : mcs51/z80/z180/r2k/r2ka/r3ka/sm83/tlcs90/ez80_z80/z80n/ds390/pic16/pic14/TININative/ds400/hc08/s08/stm8/pdk13/pdk14/pdk15/mos6502 TD- 4.2.14 #13854 (MINGW32)

Related

Wiki: SDCC 4.3.0 Release

Discussion

  • bbbbbr

    bbbbbr - 2023-02-16

    (subscribing)

     
  • Felix

    Felix - 2023-03-22

    [#3541] has been fixed in trunk. Tony, could you please revisit and/or provide a small test case? I can't reproduce "-MMD is not passed into CC1" and I do not see a connection to -Wp.

    thanks

     

    Related

    Bugs: #3541


    Last edit: Maarten Brock 2023-03-23
    • Tony Pavlov

      Tony Pavlov - 2023-03-22

      sdcc -MMD <other parameters> was not working
      sdcc -Wp-MMD <other parameters> was kind of working with the side effects, described above

      ok, i will check that when the build host emit the required version

       
  • Felix

    Felix - 2023-03-24

    Thanks. I get

    $ echo 'int main(){return 0;}' > testfile.c
    $ sdcc -MMD -c testfile.c
    $ cat testfile.d 
    testfile.rel: testfile.c
    

    (And similar with "-Wp -MMD".)

    This looks good to me.

     
  • Felix

    Felix - 2023-05-01
    • status: open --> pending-fixed
    • assigned_to: Felix
     
  • Felix

    Felix - 2023-05-01

    pending-fixed with [#3541].

     

    Related

    Bugs: #3541


    Last edit: Maarten Brock 2023-05-04
  • Felix

    Felix - 2023-11-08
    • labels: --> sdcpp
    • status: pending-fixed --> closed-fixed
     

Log in to post a comment.

MongoDB Logo MongoDB