biggestsonicfan / i960-CTOOLS-with-NINDY

A repo in which i960 CTOOLS and NINDY are mirrored and a work in progress for binaries will be.
4 stars 2 forks source link

lib/qtrom.ld and unexpected characters? #3

Closed biggestsonicfan closed 4 years ago

biggestsonicfan commented 4 years ago

At the final link state I960BASE=~/i960-CTOOLS-with-NINDY/i386-nbsd1-ctools/ ../i386-nbsd1-ctools/bin/lnk960 -o qtrom lib/qtrom.ld kx/kx_init.o basefile.o fp.o float.o fp_flt.o kx/kx.a qt960/qt.a -lckb, lnk960 is throwing Unexpected character 13 (decimal) found at lineno... errors.

I'm not sure what lnk960 doesn't like about the file but it's preventing the final link from happening.

EDIT1: Looking at ldlex.l and comparing it to ldlex.c they look different but seem to catch what is only a decimal. However, there are no decimals in the lines in qtrom.ld.... this is very perplexing, and perhaps lnk960 needs recompiling?

biggestsonicfan commented 4 years ago

So what I ended up doing was stripping the qtrom.ld of all its comments, then renaming it qtrom.c. I then ran qtrom.c through the preprocessor I960BASE=~/i960-CTOOLS-with-NINDY/i386-nbsd1-ctools/ ../../i386-nbsd1-ctools/bin/ic960 -E qtrom.c > qtrom.ld and output the file to qtrom.ld. After editing the file to remove the preprocessor comments, it seemed to get further in the compile, so using qtrom_test.ld in commit 3c1886d303f959846b69ddbcd61f5995c0a5c379 will fix this issue.

biggestsonicfan commented 4 years ago

I found a more elegant solution using bash: LC_ALL=C sed 's/[^[:blank:][:print:]]//g' qtrom.ld > qtrom_fix.ld This removes all special characters from the linker directive file.