gcc 4.9.4 安装和6.2的区别

Introduction to GCC
The GCC package contains the GNU
Compiler Collection. This page describes the installation of
compilers for the following languages: C, C++, Fortran, Objective
C, Objective C++, and Go. Two additional languages , Ada and Java
are available in the collection. They have specific requirements,
so they are described in separate pages ( and
). Since C and C++ are installed
in LFS, this page is either for upgrading C and C++, or for
installing additional compilers.
This package is known to build and work properly using an LFS-7.10
If you are upgrading GCC from
any other version prior to 6.3.0, then you must be careful
compiling 3rd party kernel modules. You should ensure that the
kernel and all its native modules are also compiled using the
same version of GCC that you use
to build the 3rd party module. This issue does not affect native
kernel (and kernel modules) updates, as the instructions below
are a complete reinstallation of GCC. If you have existing 3rd party modules
installed, ensure they are recompiled using the updated version
of GCC. As always, never update
the kernel headers from the ones used when Glibc was compiled during LFS.
The 5.1.0 version of GCC introduces an incompatible ABI change in
the C++ library libstdc++.so. This
does not prevent using programs compiled with the previous
version of GCC , since both old
and new symbols are available in the library. But compiling, with
the new version, programs which use libraries compiled with the
old version is likely to give errors. So, if you are upgrading
from any previous version prior to 5.1.0, you have two solutions:
recompile all the libraries with the new version, or use the
--with-default-libstdcxx-abi switch
to configure.
Package Information
Download (HTTP):
Download (FTP):
Download MD5 sum: 677aab9debb6
Download size: 95 MB
Estimated disk space required: 7.7 GB (with tests)
Estimated build time: 58 SBU (with tests and parallelism=4)
GCC Dependencies
Recommended
, for tests
User Notes:
Installation of GCC
Even if you specify only languages other than C and C++ to the
./configure command
below, the installation process will overwrite your existing
GCC C and C++ compilers and
libraries. Having the Tcl,
Expect and DejaGnu packages installed before beginning
the build is highly recommended so you can run the full suite of
Do not continue with the make
install command until you are confident the build
was successful. You can compare your test results with those
found at .
You may also want to refer to the information found in the
GCC section of Chapter 6 in the
LFS book ().
The instructions below are intentionally performing a
&bootstrap& process.
Bootstrapping is needed for robustness and is highly recommended
when upgrading the compilers version. To disable bootstrap anyways,
add --disable-bootstrap to
the ./configure
options below.
Install GCC by running the
following commands:
case $(uname -m) in
sed -e '/m64=/s/lib64/lib/' \
-i.orig gcc/config/i386/t-linux64
mkdir build
../configure
--prefix=/usr
--disable-multilib
--with-system-zlib
--enable-languages=c,c++,fortran,go,objc,obj-c++ &&
If you have installed additional packages such as Valgrind and GDB, the GCC
part of the testsuite will run more tests than in LFS. Some of
those will report FAIL and others XPASS (pass when expected to
FAIL). To run the tests, issue:
ulimit -s 32768 &&
make -k check
The tests are very long, and the results may be hard to find in the
logs, specially if you use parallel jobs with make. You can get a
summary of the tests with:
../contrib/test_summary
Now, as the root user:
make install &&
mkdir -pv /usr/share/gdb/auto-load/usr/lib
mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib &&
chown -v -R root:root \
/usr/lib/gcc/*linux-gnu/6.3.0/include{,-fixed}
Some packages expect to find the C preprocessor in /lib or may refer to the C compiler under the
name cc. The
following symbolic links are not needed if you have followed the
LFS instructions, since they have been already created. If you do
not have them on your system, issue as the root user:
ln -v -sf ../usr/bin/cpp /lib
ln -v -sf gcc /usr/bin/cc
install -v -dm755 /usr/lib/bfd-plugins &&
ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/6.3.0/liblto_plugin.so /usr/lib/bfd-plugins/
Command Explanations
build: The GCC
documentation recommends building the package in a dedicated build
directory.
--disable-multilib: This
parameter ensures that files are created for the specific
architecture of your computer.
--with-system-zlib: Uses
the system zlib instead of the
bundled one. zlib is used for
compressing and uncompressing GCC's intermediate language in LTO (Link Time
Optimization) object files.
--enable-languages=c,c++,fortran,go,objc,obj-c++:
This command identifies which languages to build. You may modify
this command to remove undesired languages.
--with-default-libstdcxx-abi=gcc4-compatible: Use
this switch if you are upgrading from a GCC version prior to 5.1.0, and you do not
want to recompile all the libraries written in C++.
ulimit -s 32768: This
command prevents several tests from running out of stack space.
make -k check: This
command runs the test suite without stopping if any errors are
encountered.
../contrib/test_summary: This
command will produce a summary of the test suite results. You can
append | grep -A7
Summ to the command to produce an even more
condensed version of the summary. You may also wish to redirect the
output to a file for review and comparison later on.
mv -v /usr/lib/*gdb.py
...: The installation stage puts some files used by
gdb under the /usr/lib directory. This generates spurious error
messages when performing ldconfig. This command moves the
files to another location.
chown -v -R root:root
/usr/lib/gcc/*linux-gnu/...: If the package is
built by a user other than root, the ownership of the installed
include directory (and its content)
will be incorrect. This command changes the ownership to the
root user and group.
Some program and library names and descriptions are not listed
here, but can be found at
as they were initially installed during the building of LFS.
Installed Programs:
gccgo, go, gofmt and gfortran,
hard-linked to architecture specific names
Installed Libraries:
libgfortran.{so,a}, libgo.{so,a},
libgobegin.a, libgolibbegin.a, libnetgo.a, libobjc.{so,a}, and
numerous other run-time libraries and executables
Installed Directories:
/usr/lib/go/6.3.0
Short Descriptions
is a GCC-based compiler for the Go language.
is a tool for managing Go source code.
is a tool for formatting Go source code.
is a GCC-based compiler for the Fortran language.Categories
Categories
Happy Holidays!
This site relies upon advertisements to continue producing new Linux/open-source content over the past 12+ years. If you wish to continue blocking ads, please consider this holiday . Besides an ad-free experience, Phoronix Premium grants access to multi-page articles on a single page and other benefits while still supporting our site. Or if you insist on blocking ads, perhaps consider
Thanks for your support and happy holidays.
GCC 4.9, Clang 3.4 Will Have Better C++14 Support
Written by
on 25 July 2013 at 02:33 AM EDT.
We're still many months out from seeing the release of
releases, but with the next major updates to these open-source code compilers will come better support for the C++14 (C++1y) language.
C++1y is the next major update to the C++ programming language and succeeds C++11. C++1y is expected to be released in 2014 -- and thus would be officially C++14 -- and it's an evolutionary upgrade over C++11.
Both GCC and LLVM/Clang have already been working towards C++1y support with regards to the likely proposals and changes for the language update. The current stable releases of GCC and Clang already have in early support.
Among the C++1y enablement introduced so far in the GCC 4.9 development cycle include:
- Support for binary literals in the core C++ language.
- The latest (Revision 5) of return type deduction for normal functions.
- Runtime-sized arrays with automatic storage duration / expanded variable length array support from what was supported currently.
- Full support for generalized lambda capture initializers.
Among the work items still to do are generic lambda expressions, variable templates, relaxed requirements on constexpr functions, member initializers and aggregates, and clarifying memory allocation. The active C++1y/C++14 support status for GCC is documented on . Enabling C++14 support in modern compilers can be done via the -std=c++1y switch for the GCC C++ compiler or LLVM's Clang compiler.
The current LLVM/Clang support for C++1y meanwhile can be found on their .
About The Author
Michael Larabel is the principal author
and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via
or contacted via .
Related Compiler News
Popular News
Latest Linux News
Latest Featured Articles
Support Phoronix
The mission at Phoronix since 2004 has centered around enriching the Linux hardware experience. In addition to supporting our site through advertisements, you can help by . You can also use our
shopping links when making online purchases or contribute to Phoronix through a .}

我要回帖

更多关于 gcc 4.9.4 下载 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信