StephanTLavavej / mingw-distro

MinGW distro build scripts.
494 stars 55 forks source link

The magic directory surgery in mingw-w64+gcc.sh is annoying #7

Open StephanTLavavej opened 8 years ago

StephanTLavavej commented 8 years ago

mingw-w64+gcc.sh contains:

# Prepare to build gcc - perform magic directory surgery.
cp -r dest/x86_64-w64-mingw32/lib dest/x86_64-w64-mingw32/lib64
cp -r dest/x86_64-w64-mingw32 dest/mingw
mkdir -p src/gcc/winsup/mingw
cp -r dest/x86_64-w64-mingw32/include src/gcc/winsup/mingw/include

It's annoying that directories have to be copied around like this. It would be nice if a MinGW/GCC build system expert could fix the upstream sources so that this is unnecessary.

Note that this is a non-critical annoyance because I'm able to delete the copied directories before packaging the component for end users.

vilyair commented 6 years ago

When I attempted to build GCC, the above codes seemed to be substitute by:

export CPATH=dest/x86_64-w64-mingw32/include
export LIBRARY_PATH=dest/x86_64-w64-mingw32/lib

I hope that this snippet of codes would work in your build scripts.

Peter0x44 commented 4 months ago

This is weird, but as far as I can tell, the build script just checks if they exist, it doesn't actually care about the contents of "mingw". So, creating the directories would be fine, there is no need to copy any files.

StephanTLavavej commented 4 months ago

Interesting, I'll have to try that the next time I build the distro, thanks!