在哪里修复asm错误:‘;asm&x2019;编译gcc-7.2.0时未声明(此函数首次使用)

在哪里修复asm错误:‘;asm&x2019;编译gcc-7.2.0时未声明(此函数首次使用),gcc,Gcc,我一直在尝试安装gcc-7.2.0。我在ubuntu和centos 6.7上都遇到了同样的错误。我看到的帖子建议将CFLAGS从-std=c99改为-std=gnu99。但我不知道我必须在哪个文件中更改它。从文件gcc_7_2_0_release/libgcc/config/i386/sfp exceptions.c的第55行开始,有几行出现了相同的错误。 错误是 gcc_7_2_0_release/libgcc/config/i386/sfp-exceptions.c: In function

我一直在尝试安装gcc-7.2.0。我在ubuntu和centos 6.7上都遇到了同样的错误。我看到的帖子建议将CFLAGS从-std=c99改为-std=gnu99。但我不知道我必须在哪个文件中更改它。从文件gcc_7_2_0_release/libgcc/config/i386/sfp exceptions.c的第55行开始,有几行出现了相同的错误。 错误是

gcc_7_2_0_release/libgcc/config/i386/sfp-exceptions.c: In function ‘__sfp_handle_exceptions’:
gcc_7_2_0_release/libgcc/config/i386/sfp-exceptions.c:55:7: error: ‘asm’ undeclared (first use in this function)
asm volatile ("fdiv\t{%y0, %0|%0, %y0}" : "+t" (f));
谢谢你的帮助 gcc-v给出了以下长摘录:

 "Using built-in specs.
Target: i686-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch=i686 --build=i686-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC) 

我不得不把它作为一个编辑,因为它对于一个评论来说太长了

如果你运行'gcc-v',你会看到什么输出?从Igor那里得到提示,我在ubuntu上做了“gcc-v”,gcc-7安装正确,这要感谢“sudo add apt repository ppa:jonathonf/gcc-7.1,sudo apt get update,sudo apt get install gcc-7 g++-7”。我在Centos上的安装中使用了此安装版本的gcc-v输出。asm错误消失,但出现其他错误。在更正错误后,我被困在“配置:错误:无法计算目标文件的后缀:无法编译”中,我尝试从源代码独立安装gmp、mpc、mpfr和isl,但没有成功。从这里u-toolchain/issues/134仍在挣扎,这就是我如何让gcc-7.2.0构建一个安装/配置——使用xlen=32——prefix=/usr——disable float——disable atomic。感谢所有花时间研究我的问题的人,如果你运行'gcc-v',你会看到什么输出?从Igor R得到提示,我在ubuntu上做了“gcc-v”,gcc-7安装正确,这要感谢“sudo add apt repository ppa:jonathonf/gcc-7.1,sudo apt get update,sudo apt get install gcc-7 g++-7”。我在Centos上的安装中使用了此安装版本的gcc-v输出。asm错误消失,但出现其他错误。在更正错误后,我被困在“配置:错误:无法计算目标文件的后缀:无法编译”中,我尝试从源代码独立安装gmp、mpc、mpfr和isl,但没有成功。从这里u-toolchain/issues/134仍在挣扎,这就是我如何让gcc-7.2.0构建一个安装/配置——使用xlen=32——prefix=/usr——disable float——disable atomic。感谢所有花时间研究我问题的人