MaxKellermann / cegcc-build

CEGCC build scripts
http://max.kellermann.name/projects/cegcc/
27 stars 16 forks source link

x86 support? #5

Open Stekke opened 4 years ago

Stekke commented 4 years ago

Hey, thanks for maintaining this project!

Is there any possibility of getting x86 support?
I was able to successfully compile the arm version.
However changing TARGET in build.sh to i386-mingw32ce resulted in a compilation failure while building gcc-bootstrap/gcc:

/tmp/cegcc-output/gcc-bootstrap/./gcc/xgcc -B/tmp/cegcc-output/gcc-bootstrap/./gcc/ -L/tmp/cegcc-output/gcc-bootstrap/i386-mingw32ce/winsup/mingw -L/tmp/cegcc-output/gcc-bootstrap/i386-mingw32ce/winsup/w32api/lib -isystem /home/s/cegcc-build/gcc/winsup/mingw/include -isystem /home/s/cegcc-build/gcc/winsup/w32api/include -B/opt/cegcc/i386-mingw32ce/bin/ -B/opt/cegcc/i386-mingw32ce/lib/ -isystem /opt/cegcc/i386-mingw32ce/include -isystem /opt/cegcc/i386-mingw32ce/sys-include    -g -O2 -O2 -I/home/s/cegcc-build/gcc/libgcc/../winsup/w32api/include -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -I. -I. -I../.././gcc -I/home/s/cegcc-build/gcc/libgcc -I/home/s/cegcc-build/gcc/libgcc/. -I/home/s/cegcc-build/gcc/libgcc/../gcc -I/home/s/cegcc-build/gcc/libgcc/../include  -DHAVE_CC_TLS -DUSE_EMUTLS -o _trampoline.o -MT _trampoline.o -MD -MP -MF _trampoline.dep -DL_trampoline -c /home/s/cegcc-build/gcc/libgcc/libgcc2.c
/home/s/cegcc-build/gcc/libgcc/libgcc2.c:2186:10: fatal error: windows.h: No such file or directory
 #include <windows.h>
          ^~~~~~~~~~~
compilation terminated.
make: *** [Makefile:494: _trampoline.o] Error 1

I'm not sure if there is something else I need to change, or if x86 is just not supported at all. CeGCC originally supported it I think, so I was hoping it would've still worked.

MaxKellermann commented 4 years ago

No, not possible right now. My project (based on the very old cegcc project) has arm-wince support as one special case, but there is no code for supporting i386. It would be possible to develop this (with some deeper GCC knowledge), but I'm not interested in spending time on this, because I have so many other projects fighting for my free time and I don't have any i386-CE hardware.

Stekke commented 4 years ago

Ah, alright.
Unfortunately I don't have much knowledge of GCC.

ColinFinck commented 8 months ago

For what it's worth, I just had the same requirement at work and updated the cegcc-build and gcc repos to support x86 Windows CE targets. My work is now available at https://github.com/enlyze/cegcc-build

drolevar commented 5 months ago

@ColinFinck Fantastic! We have a WinCE 5 target which has to be supported for many more years together with some Linux targets, so I will definitely give it a try! Would you consider opening the "Issues" in your project just in case?

ColinFinck commented 5 months ago

@drolevar sure, feel free to use my repo and open issues/PRs against it. I just can't promise that I'll find the time to look at them. However, you can always fork my repo and continue from there. Would continue a tradition :D

drolevar commented 5 months ago

@ColinFinck It's just that "issues" tab is not visible there. BTW, have you tried compiling it using Mingw? And other environments, like Cygwin?

ColinFinck commented 5 months ago

@drolevar Ah, thanks for the hint. Fixed that. Please check out my blog post at https://building.enlyze.com/posts/a-new-windows-ce-x86-compiler-in-2024/ for all details. Regarding your question: I didn't try building it in Cygwin and MinGW, but I don't see huge blockers (built Windows compilers in the past). It currently only runs in our Linux-based CI.