Skip to content

Commit

Permalink
add symlink to provide cpp in /lib/cpp as hard-coded in gcc configure…
Browse files Browse the repository at this point in the history
… script
  • Loading branch information
lkeegan committed Jan 19, 2024
1 parent 520bc5e commit c7e408c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,16 @@ cmake --version
if [[ "$OS_TARGET" != "osx" ]]; then

if [[ "$OS_TARGET" == "win64-mingw" ]]; then
which cpp
whereis cpp
/mingw64/bin/cpp --version
# gcc configure script assumes these dirs exist and build fails if they don't
# https://wiki.osdev.org/GCC_Cross-Compiler#Building_GCC:_the_directory_that_should_contain_system_headers_does_not_exist
mkdir -p $SYSROOT/mingw/include
mkdir -p $SYSROOT/mingw/lib
# gcc configure script has C pre-processor location hard-coded to "/lib/cpp"
ln -s /mingw64/bin/cpp /lib/cpp
/lib/cpp --version
fi

# build gfortran static runtime libs with PIC
Expand Down

0 comments on commit c7e408c

Please sign in to comment.