aboutsummaryrefslogtreecommitdiff
path: root/winsup/utils
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2020-10-03 14:41:58 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2020-10-18 14:55:13 +0100
commitb55e3f1916edcb457bc4cc91d74e2c8dfa85e57e (patch)
tree5d43c07f0d8bf8df7e07f979f48e708c622f1bbd /winsup/utils
parent5601d5364085b95142254b87f4f656339264be9f (diff)
downloadnewlib-b55e3f1916edcb457bc4cc91d74e2c8dfa85e57e.zip
newlib-b55e3f1916edcb457bc4cc91d74e2c8dfa85e57e.tar.gz
newlib-b55e3f1916edcb457bc4cc91d74e2c8dfa85e57e.tar.bz2
Cygwin: Remove ccwrap
ccwrap massages the compiler's standard include directories to remove '/usr/include/w32api', with the intent of allowing it to be overriden by '--with-windows-headers' (See 4c36016b). I'm not 100% convinced that this is always working as desired, since in some places w32api includes are done using <w32api/something.h>, which will find them via the path /usr/include. If this does turn out to be needed, this could also be implemented by constructing the appropriate compiler flags once, rather than on every compiler invocation.
Diffstat (limited to 'winsup/utils')
-rw-r--r--winsup/utils/Makefile.in11
-rw-r--r--winsup/utils/aclocal.m416
-rwxr-xr-xwinsup/utils/configure16
3 files changed, 16 insertions, 27 deletions
diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in
index 889fdaa..bd17d68 100644
--- a/winsup/utils/Makefile.in
+++ b/winsup/utils/Makefile.in
@@ -11,12 +11,10 @@ target_builddir:=@target_builddir@
winsup_srcdir:=@winsup_srcdir@
configure_args=@configure_args@
-export CC:=@CC@
-export CXX:=@CXX@
-
CFLAGS_COMMON=-Wimplicit-fallthrough=4 -Werror
CFLAGS:=@CFLAGS@
CXXFLAGS:=@CXXFLAGS@
+INCLUDES:=@INCLUDES@
override CFLAGS+=${CFLAGS_COMMON}
override CXXFLAGS+=-fno-exceptions -fno-rtti ${CFLAGS_COMMON}
@@ -24,13 +22,6 @@ include ${srcdir}/../Makefile.common
cygwin_build:=${target_builddir}/winsup/cygwin
-cygwin_headers:=@cygwin_headers@
-
-# environment variables used by ccwrap
-export CCWRAP_HEADERS:=. ${srcdir} $(call justdir,${cygwin_headers})
-export CCWRAP_SYSTEM_HEADERS:=${cygwin_headers} @newlib_headers@
-export CCWRAP_DIRAFTER_HEADERS:=@windows_headers@
-
WINDOWS_LIBDIR:=@windows_libdir@
prefix:=@prefix@
diff --git a/winsup/utils/aclocal.m4 b/winsup/utils/aclocal.m4
index 4adb9c0..88de6cb 100644
--- a/winsup/utils/aclocal.m4
+++ b/winsup/utils/aclocal.m4
@@ -42,7 +42,6 @@ AC_SUBST(windows_libdir)
)
AC_DEFUN([AC_CYGWIN_INCLUDES], [
-addto_CPPFLAGS -nostdinc
: ${ac_cv_prog_CXX:=$CXX}
: ${ac_cv_prog_CC:=$CC}
@@ -69,13 +68,14 @@ else
AC_MSG_ERROR([cannot find windows header files])
fi
fi
-CC=$ac_cv_prog_CC
-CXX=$ac_cv_prog_CXX
-export CC
-export CXX
-AC_SUBST(windows_headers)
-AC_SUBST(newlib_headers)
-AC_SUBST(cygwin_headers)
+
+INCLUDES="-I${srcdir}/../cygwin -I${target_builddir}/winsup/cygwin"
+INCLUDES="${INCLUDES} -isystem ${cygwin_headers}"
+for h in ${newlib_headers}; do
+ INCLUDES="${INCLUDES} -isystem $h"
+done
+INCLUDES="${INCLUDES} -isystem ${windows_headers}"
+AC_SUBST(INCLUDES)
])
AC_DEFUN([AC_CONFIGURE_ARGS], [
diff --git a/winsup/utils/configure b/winsup/utils/configure
index 3ad7c8a..ec9bea1 100755
--- a/winsup/utils/configure
+++ b/winsup/utils/configure
@@ -593,9 +593,7 @@ MINGW_CXX
INSTALL_DATA
INSTALL_SCRIPT
INSTALL_PROGRAM
-cygwin_headers
-newlib_headers
-windows_headers
+INCLUDES
ac_ct_CXX
CXXFLAGS
CXX
@@ -3111,7 +3109,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-addto_CPPFLAGS -nostdinc
: ${ac_cv_prog_CXX:=$CXX}
: ${ac_cv_prog_CC:=$CC}
@@ -3138,12 +3135,13 @@ else
as_fn_error $? "cannot find windows header files" "$LINENO" 5
fi
fi
-CC=$ac_cv_prog_CC
-CXX=$ac_cv_prog_CXX
-export CC
-export CXX
-
+INCLUDES="-I${srcdir}/../cygwin -I${target_builddir}/winsup/cygwin"
+INCLUDES="${INCLUDES} -isystem ${cygwin_headers}"
+for h in ${newlib_headers}; do
+ INCLUDES="${INCLUDES} -isystem $h"
+done
+INCLUDES="${INCLUDES} -isystem ${windows_headers}"