This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 3 of 3] mingw32: enable sysrooted toolchains


# HG changeset patch
# User Esben Haabendal <eha@doredevelopment.dk>
# Date 1281821812 -7200
# Node ID c481898ee775fdf4f1e03e5919b701a2104a8fc2
# Parent  198c99380191e778dd5065eec39d83dc9f905463
mingw32: enable sysrooted toolchains

When targeting mingw32, gcc expects to find its include files
in "minw/include" instead of the traditional "usr/include".

[Yann E. MORIN: split the original patch]

diff --git a/scripts/build/cc/gcc.sh b/scripts/build/cc/gcc.sh
--- a/scripts/build/cc/gcc.sh
+++ b/scripts/build/cc/gcc.sh
@@ -428,7 +428,13 @@
     fi
 
     CT_DoLog EXTRA "Building final compiler"
+    if [ "${CT_MINGW32}" = "y" ]; then
+        CT_DoExecLog ALL ln -sv "usr" "${CT_SYSROOT_DIR}/mingw"
+    fi
     CT_DoExecLog ALL make ${PARALLELMFLAGS} all
+    if [ "${CT_MINGW32}" = "y" ]; then
+        CT_DoExecLog ALL rm "${CT_SYSROOT_DIR}/mingw"
+    fi
 
     CT_DoLog EXTRA "Installing final compiler"
     CT_DoExecLog ALL make install
diff --git a/scripts/build/libc/mingw.sh b/scripts/build/libc/mingw.sh
--- a/scripts/build/libc/mingw.sh
+++ b/scripts/build/libc/mingw.sh
@@ -65,6 +65,7 @@
     CT_DoExecLog ALL                                              \
     "${CT_SRC_DIR}/w32api-${CT_W32API_VERSION}-mingw32/configure" \
         --prefix=${CT_SYSROOT_DIR}                                \
+        --includedir=${CT_HEADERS_DIR}                            \
         --host=${CT_TARGET}
 
     CT_DoLog EXTRA "Building W32-API"
@@ -83,6 +84,7 @@
     CT_DoExecLog ALL                                                \
     "${CT_SRC_DIR}/mingwrt-${CT_MINGWRT_VERSION}-mingw32/configure" \
         --prefix=${CT_SYSROOT_DIR}/                                 \
+        --includedir=${CT_HEADERS_DIR}                              \
         --host=${CT_TARGET}
 
     CT_DoLog EXTRA "Building MinGW Runtime"
@@ -120,7 +122,7 @@
         CT_DoLog EXTRA "Installing PDCurses development files"
         chmod a+r ${CT_SRC_DIR}/PDCurses-${CT_MINGW_PDCURSES_VERSION}/*.h
         cp ${CT_SRC_DIR}/PDCurses-${CT_MINGW_PDCURSES_VERSION}/*.h \
-           ${CT_HEADERS_DIR}
+           ${CT_HEADERS_DIR}/
         cp pdcurses.a ${CT_SYSROOT_DIR}/lib/libpdcurses.a
         cp pdcurses.a ${CT_SYSROOT_DIR}/lib/libncurses.a
     fi
@@ -134,10 +136,11 @@
         CFLAGS="${CT_CFLAGS_FOR_TARGET}"                \
         CT_DoExecLog ALL                                \
         "${CT_SRC_DIR}/mingw-libgnurx-${CT_MINGW_GNURX_VERSION}/configure" \
-            --build=${CT_BUILD}           \
-            --host=${CT_TARGET}           \
-            --prefix=${CT_SYSROOT_DIR}    \
-            --enable-shared               \
+            --build=${CT_BUILD}             \
+            --host=${CT_TARGET}             \
+            --prefix=${CT_SYSROOT_DIR}      \
+            --includedir=${CT_HEADERS_DIR}  \
+            --enable-shared                 \
             --enable-static
 
         CT_DoLog EXTRA "Building GnuRX development files"

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]