cygwin: workaround GCC 6 changes
GCC 6 includes a number of new warnings which cause Cygwin to either not compile, or not work properly even if said warnings are ignored: https://cygwin.com/ml/cygwin-developers/2017-09/msg00000.html https://gcc.gnu.org/gcc-6/porting_to.html For now, we use the flags necessary to revert to GCC 5 behaviour until we can fix the code properly. Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
This commit is contained in:
		| @@ -73,11 +73,11 @@ CRT0:=$(cygwin_build)/crt0.o | ||||
| # | ||||
| MT_SAFE:=@MT_SAFE@ | ||||
| CCEXTRA= | ||||
| COMMON_CFLAGS=-MMD ${$(*F)_CFLAGS} -Werror -fmerge-constants -ftracer $(CCEXTRA) | ||||
| COMMON_CFLAGS=-MMD ${$(*F)_CFLAGS} -Werror -fno-delete-null-pointer-checks -fmerge-constants -ftracer $(CCEXTRA) | ||||
| ifeq ($(target_cpu),x86_64) | ||||
| COMMON_CFLAGS+=-mcmodel=small | ||||
| endif | ||||
| COMPILE.cc+=${COMMON_CFLAGS} | ||||
| COMPILE.cc+=${COMMON_CFLAGS} -std=gnu++98 | ||||
| COMPILE.c+=${COMMON_CFLAGS} | ||||
|  | ||||
| AR:=@AR@ | ||||
|   | ||||
| @@ -20,7 +20,9 @@ void | ||||
| mainCRTStartup () | ||||
| { | ||||
| #ifdef __i386__ | ||||
| #pragma GCC diagnostic ignored "-Wframe-address" | ||||
|   (void)__builtin_return_address(1); | ||||
| #pragma GCC diagnostic pop | ||||
|   asm volatile ("andl $-16,%%esp" ::: "%esp"); | ||||
| #endif | ||||
|  | ||||
|   | ||||
| @@ -23,7 +23,9 @@ static void WINAPI | ||||
| threadfunc_fe (VOID *arg) | ||||
| { | ||||
| #ifndef __x86_64__ | ||||
| #pragma GCC diagnostic ignored "-Wframe-address" | ||||
|   (void)__builtin_return_address(1); | ||||
| #pragma GCC diagnostic pop | ||||
|   asm volatile ("andl $-16,%%esp" ::: "%esp"); | ||||
| #endif | ||||
|   _cygtls::call ((DWORD (*)  (void *, void *)) TlsGetValue (_my_oldfunc), arg); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user