Let's start with a few links:(1) https://gcc.gnu.org/onlinedocs/gcc-4.3.6/gcc/Vector-Extensions.html(2) https://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html(3) https://gcc.gnu.org/onlinedocs/gcc-3.4.2/gcc/X86-Built_002din-Functions.htmlYou can see the first two links, t
The differences between arm-linux-gcc and arm-elf-gcc in one sentence-Linux general technology-Linux programming and kernel information. The following is a detailed description. How can we explain the differences between arm-linux-gcc and arm-elf-gcc in one sentence?
Arm-linux-g
Slave
SVN checkout SVN: // gcc.gnu.org/svn/gcc/trunkget the latest gcccode, computation and compilation of the things about learning c++ 11, and the following problems occur during configure:Building GCC requires GMP 4.2 +, mpfr 2.3.1 + and MCM 0.8.0 +Http://www.multiprecision.org/mpc download mpc-0.9.tar.gz
Bytes
Http://ftp.gnu.org/gnu/mpfr/download mpfr-3.1.0.tar.xz.
Install GMP first. Decom
I recently practiced the questions above ACM.
If the run result is named correctly, it cannot be passed.
I think it is a problem with the compiler.
ACM is generally a GCC compiler.
It seems that it is better to use eclipse.
Next to eclipse for C ++ on the official website
Next, the GCC compiler for mingw.
Configuration is OK.
Use of eclipse for C ++:
1. if an error occurs during running, first bu
In ARM-based embedded system development, there are two GCC tool chains that often use cross-Compilation:The main difference between ARM-Linux-* and arm-elf-* is that they use different C-library files. Arm-Linux-* useWhile arm-elf-* generally uses uclibc/UC-libc or RedHat for embedded systems.Newlib. glibc. Both uclibc, UC-libc, and newlib are C language library files.Glibc is developed for PC, and uclibc/UC-libc is a small size compatible with glibc
The previous few days in preparation for the CENTOS7 under the compilation environment, the online installation of GCC and gcc-c++ is very simple, as long as the machine is networked in the terminal window in order to enter separately1 Yum Install gcc 2 Yum install gcc-c++The installation can be completed online, and t
Install the GCC compiler and the GCC compiler1. Introduction to GCC
GCC (GNU Compiler Collection) is a powerful and superior programming language Compiler. It is one of the representative works of the GNU program. GCC is the most commonly used Compiler in Linux.
C language compilation process and GCC compilation parameters, gcc compilation Parameters
C language compilation generally involves three steps:
Gcc-E-o a. e a. c
Pre-compile the. c file. The generated target file name is a.e.
Pre-compilation is to replace the header file content contained in include with the C file, and delete unused comments in the code.
Exampl
No Internet access, the use of CD-ROM installation of GCC and gcc-c++ method is as follows:
First put the CD into the optical drive, the virtual machine in the words on the ISO CD image can be.
And then the following:
[Root@localhost ~]# more gcc_install.sh
#!/bin/bashMount/dev/cdrom/mntcd/mnt/centos/RPM-IVH glibc-common-2.5-42.i386.rpmRPM-IVH kernel-headers-2.6.18-164.el5.i386.rpmRPM-IVH libgcc-4.1.2-46.el
What is the difference between arm-linux-gcc and arm-elf-gcc? embedded basic series-general Linux technology-Linux programming and kernel information. For more information, see the following. How can we explain the differences between arm-linux-gcc and arm-elf-gcc in one sentence?
Arm-linux-
Brief introductionSome of the software is newer and requires a higher GCC version, so you need to upgrade GCC. Compiling and installing is time consuming, so it is good to choose bin package directly.StepsAdd source1 sudo add-apt-repository ppa:ubuntu-toolchain-r/test2sudo apt-get updateInstall dependent packages (this is required if an error occurs)1 sudo Install Software-properties-commonUpgrade Installat
First, confirm that the GCC and make packages have been installedYou can use the Whereis command to view:If the Whereis gcc and whereis make commands have results, you can continue to do so by installing both software.Second, use GCC compile to run a HelloWorld program (only involves a single file)You can write a C program in any directory and then compile and ru
Common gcc/g ++ commands and gcc Command Options
Common options for gcc/g ++ commands (option description)
-O FILE specifies the output FILE name. This option is not required during compilation of the target code. If FILE is not specified, the default FILE name is a. out.
-C: only compile and generate the target file without Link
-Msung optimizes code for 486.
-O
-o0
-o1
-o2
-o3
4 levels of compiler optimization options,-o0 means no optimizations,-o1 defaults,-O3 optimization level most (here is Capital letter O)
Optimization Options (Source: http://blog.csdn.net/Sodier/article/details/452566)
This part of the content can be divided into two parts, part of this is to have the compiler analyze the code, and the other part is that we can make some information about the hardware for the compiler, and let him generate better code for the hardware, and we h
arm-linux-gcc Cross compiler and gcc compiler download address1. ARM-NONE-LINUX-GNUEABI-GCC compiler
ARM-NONE-LINUX-GNUEABI-GCC is the arm cross-compilation tool launched by Codesourcery (which has been acquired by mentor) based on GCC. Code that can be used to cross-compile
GCC program compilation and gcc Compilation1. Introduction
GCC program compilation can be divided into four stages:
Preprocessing (Pre-Preocessing)
Compile (Compiling)
Assembly)
Link (Linking)
2. Basic GCC usage
Basic usage:Gcc [options] [filename]Common options selection and usage are described as f
structuresifThe statement implementation is the same as that in Listing 2 (see./Linux/Drivers/SCSI/SD. c), but Listing 2 is more concise. Useswitch/caseYou can also use the jump table to implement Compiler optimization.
Listing 2.caseScope of use in statement
static int sd_major(int major_idx){switch (major_idx) {case 0:return SCSI_DISK0_MAJOR;case 1 ... 7:return SCSI_DISK1_MAJOR + major_idx - 1;case 8 ... 15:return SCSI_DISK8_MAJOR + major_idx - 8;default:BUG();return 0;/* shut up
Method 1: # pragma pack (n)
Using the pseudo command # pragma pack (n), the compiler will align according to n Bytes;Use the pseudo command # pragma pack () to cancel the custom byte alignment.If the value of n specified in # pragma pack (n) is greater than the size of the maximum member in the structure, the structure still performs Bounds Based on the largest member in size.
Note: This method is added in gcc 4. At least
Use the _ attribute _ of gcc to compile the attribute section sub-item to construct the initialization function table. The gcc _ attribute _
This article forwarded from: https://my.oschina.net/u/180497/blog/177206
It solves song Baohua's previousC language object-oriented (for larger software) ppt sharing and ppt annotationsMulti-module software initialization
Gcc's _ attribute _ compilation attribute has
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.