我正在使用msys为Windows10构建GCC 8.3.0,构建失败并出现以下错误:
gcc -c -DHAVE_CONFIG_H -g -I. -I../../source/libiberty/../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -Wshadow=local -pedantic -D_GNU_SOURCE ../../source/libiberty/pex-win32.c -o pex-win32.o
In file included from ../../source/libiberty/pex-common.h:25,
from ../../source/libiberty/pex-win32.c:21:
c:\software-development\prebuilt\mingw32\include\alloca.h: In function 'win32_spawn':
../../source/libiberty/../include/libiberty.h:722:20: error: inlining failed in call to always_inline '__builtin_alloca': function not considered for inlining
# define alloca(x) __builtin_alloca(x)
^~~~~~~~~~~~~~~~
In file included from c:\software-development\prebuilt\mingw32\include\stdlib.h:499,
from c:\software-development\prebuilt\mingw32\include\objbase.h:12,
from c:\software-development\prebuilt\mingw32\include\ole2.h:9,
from c:\software-development\prebuilt\mingw32\include\windows.h:100,
from ../../source/libiberty/pex-win32.c:23:
c:\software-development\prebuilt\mingw32\include\alloca.h:62:48: note: called from here
__CRT_ALIAS void *alloca( size_t __n ){ return __builtin_alloca( __n ); }有没有一种明智的方法来修复配置中的这个错误,或者失败,修补或解决这个问题的一些方法?
下面是我的当前配置,从一个批处理文件运行:
--prefix=/c/software-development/gcc-8.3.0/install-x86_64-w64-mingw32 \
--build=x86_64-w64-mingw32 \
--enable-shared \
--enable-static \
--enable-bootstrap \
--enable-languages=c,c++,lto在构建gcc 8.2.0时,也出现了同样的错误,并且猜测了构建。我正在使用GNU的MinGW 8.2.0来构建。
发布于 2019-06-20 19:51:09
尝试在"C_alloca“上的libiberty.h文件"__builtin_alloca”中到处交换。在一个地方替换。在预处理器命令中。这对我有帮助。
https://stackoverflow.com/questions/55978547
复制相似问题