Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arch Linux SDCC 3.6.0-4 build fail #28

Closed
sheinz opened this issue Aug 15, 2017 · 1 comment
Closed

Arch Linux SDCC 3.6.0-4 build fail #28

sheinz opened this issue Aug 15, 2017 · 1 comment

Comments

@sheinz
Copy link

sheinz commented Aug 15, 2017

Build is failing with Arch Linux because of the newer version of SDCC (3.6.0-4)

make
for a in dscr.a51; do \
 cp $a build/; \
 cd build && sdas8051 -logs `basename $a` && cd ..; done
for s in bulkloop.c; do \
 THISREL=$(basename `echo "$s" | sed -e 's/\.c$/\.rel/'`); \
 sdcc -mmcs51  --code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00 -Wl"-b DSCR_AREA=0x3e00" -Wl"-b INT2JT=0x3f00" -c -I ../..//include -I "" $s -o build/$THISREL ; done
bulkloop.c:177: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
bulkloop.c:178: warning 110: conditional flow changed by optimizer: so said EVELYN the modified DOG
sdcc -mmcs51  --code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00 -Wl"-b DSCR_AREA=0x3e00" -Wl"-b INT2JT=0x3f00" -o build/bulkloop.ihx build/bulkloop.rel build/dscr.rel fx2.lib -L ../..//lib
make: *** [../../lib/fx2.mk:85: build/bulkloop.ihx] Error 1

Failing commands:

sdcc -mmcs51  --code-size 0x3c00 --xram-size 0x0200 --xram-loc 0x3c00 -Wl"-b DSCR_AREA=0x3e00" -Wl"-b INT2JT=0x3f00" -o build/bulkloop.ihx build/bulkloop.rel build/dscr.rel fx2.lib -L ../..//lib -V
+ /usr/bin/sdld -nf build/bulkloop.lk
+ /usr/bin/sdld -nf build/bulkloop.lk returned errorcode 139

/usr/bin/sdld -f build/bulkloop.lk                   
ASlink >> -f build/bulkloop.lk
ASlink >> -muwx
ASlink >> -i build/bulkloop.ihx
ASlink >> -M
ASlink >> -Y
ASlink >> -X 0x0200
ASlink >> -C 0x3c00
ASlink >> -b HOME = 0x0000
ASlink >> -b XSEG = 0x3c00
ASlink >> -b PSEG = 0x3c00
ASlink >> -b ISEG = 0x0000
ASlink >> -b BSEG = 0x0000
ASlink >> -b DSCR_AREA=0x3e00
ASlink >> -b INT2JT=0x3f00
ASlink >> -k ../..//lib
ASlink >> -k /usr/bin/../share/sdcc/lib/small
ASlink >> -k /usr/share/sdcc/lib/small
ASlink >> -l fx2.lib
[1]    21459 segmentation fault (core dumped)  /usr/bin/sdld -f build/bulkloop.lk

If sdcc is downgraded to 3.6.0-3 the examples builds successfully:

downgrade sdcc
@sheinz
Copy link
Author

sheinz commented Aug 15, 2017

It seems like this issue is fixed in sdcc. The latest sdcc from svn builds the project fine.
The minor change in serial.h was necessary to build the project with the latest sdcc:

-void putchar(char c);
-char getchar();
+int putchar(char c);
+int getchar();

@sheinz sheinz closed this as completed Aug 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant