diff options
author | Christopher Faylor <me@cgf.cx> | 2000-03-19 03:53:18 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-03-19 03:53:18 +0000 |
commit | c6c9f06b7c20e7d2c3d32e314716783ccc631d91 (patch) | |
tree | 30589b0d06e8eab04a72b487d27315d908c11545 | |
parent | 72ac8b4f0fdf15552024de424be9d2fac33357f2 (diff) | |
download | newlib-c6c9f06b7c20e7d2c3d32e314716783ccc631d91.zip newlib-c6c9f06b7c20e7d2c3d32e314716783ccc631d91.tar.gz newlib-c6c9f06b7c20e7d2c3d32e314716783ccc631d91.tar.bz2 |
Patch suggested by Mumit Khan <khan@xraylith.wisc.edu>:
* strace.cc (_impure_ptr): New global variable to make strace build under
Cygwin gcc.
-rw-r--r-- | winsup/utils/ChangeLog | 6 | ||||
-rw-r--r-- | winsup/utils/Makefile.in | 4 | ||||
-rw-r--r-- | winsup/utils/strace.cc | 6 |
3 files changed, 14 insertions, 2 deletions
diff --git a/winsup/utils/ChangeLog b/winsup/utils/ChangeLog index 2030f17..49e42bb 100644 --- a/winsup/utils/ChangeLog +++ b/winsup/utils/ChangeLog @@ -1,3 +1,9 @@ +Sat Mar 18 22:52:37 2000 Christopher Faylor <cgf@cygnus.com> + + Patch suggested by Mumit Khan <khan@xraylith.wisc.edu>: + * strace.cc (_impure_ptr): New global variable to make strace build + under Cygwin gcc. + Sat Mar 18 12:45:10 2000 Christopher Faylor <cgf@cygnus.com> * Makefile.in: Make CXXFLAGS consistent with cygwin. diff --git a/winsup/utils/Makefile.in b/winsup/utils/Makefile.in index c5515ca..d76aba1 100644 --- a/winsup/utils/Makefile.in +++ b/winsup/utils/Makefile.in @@ -33,7 +33,7 @@ CXXFLAGS:=@CXXFLAGS@ -fno-exceptions -nostdinc++ -fno-rtti include $(srcdir)/../Makefile.common -MINGW_INCLUDES:=-I$(updir)/mingw/include +MINGW_INCLUDES:=-I$(mingw_source)/include -I$(cygwin_source)/include -I$(w32api_include) MINGW_CXXFLAGS:=$(CXXFLAGS) -mno-cygwin $(MINGW_INCLUDES) MINGW_CFLAGS:=$(CFLAGS) -mno-cygwin $(MINGW_INCLUDES) @@ -75,7 +75,7 @@ strace.exe: strace.cc mingw_getopt.o $(MINGW_DEP_LDLIBS) ifdef VERBOSE $(CC) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS) else - @echo $(CC) -mno-cygwin -o $@ ${wordlist 1,2,$^} ${filter-out -B%, $(MINGW_CXXFLAGS) $(MINGW_LDFLAGS)};\ + @echo $(CC) -o $@ ${wordlist 1,2,$^} ${filter-out -B%, $(MINGW_CXXFLAGS) $(MINGW_LDFLAGS)};\ $(CC) $(MINGW_CXXFLAGS) -o $@ ${wordlist 1,2,$^} -B$(mingw_build)/ $(MINGW_LDFLAGS) endif diff --git a/winsup/utils/strace.cc b/winsup/utils/strace.cc index 9d58bf6..4b08e91 100644 --- a/winsup/utils/strace.cc +++ b/winsup/utils/strace.cc @@ -8,6 +8,12 @@ #include <signal.h> #include "sys/strace.h" +/* GCC runtime library's C++ EH code unfortunately pulls in stdio, and we + get undefine references to __impure_ptr, and hence the following + hack. It should be reasonably safe however as long as this file + is built using -mno-cygwin as is intended. */ +int _impure_ptr; + static const char *pgm; static int forkdebug = 0; static int numerror = 1; |