Intel MPI 2019 always using gcc version 4.9.3 - gcc

Is there a way to specify the GCC version in intel MPI while I use the mpicc command to compile a program?

Working now.
The make the mpicc for Intel MPI to pick a specific gcc I used the option -gcc-name=path/bin/g++.
mpicc -gcc-name=path/bin/g++ text.cpp

Related

gcc cross compilation for powerpc7448

I want to cross compile the gcc for powerpc7448, and after this I want to run one simple program and get the elf from the cross compiled gcc for powerpc7448,I am using the linux OS,could anyone please suggest me the steps, cross compilation gcc for powerpc7448(any link) and what are all the components are required for cross compilation,Thanks in advance.
Try ELDK cross compiler toolchain (linux distributions) for PowerPC:
ftp://ftp.denx.de/pub/eldk/4.2/ppc-linux-x86/distribution/README.html
Check Eldk version 4.2.
Help: https://www.denx.de/wiki/ELDK-5/WebHome
ppc_74xx-gcc from eldk can be used to compile for your platform.
`
$ ppc_74xx-gcc -c myfile.c
`

On Solaris, are libraries compiled with gcc usable the same way as for libs generated with cc?

I am currently trying to compile libxml2 on Solaris. When I run the ./configure script provided with the sources, the gcc and g++ compilers are automatically used. However, I would like to use cc and CC compilers. So I run :
./configure CC=cc CXX=CC
It works but then, when I run "make", I get some errors which prevent the libraries to be generated.
When gcc and g++ are used, everything goes well with no errors, so I was wondering: can I use the librairies generated with gcc/g++ the same way I would have used them if I had successively generated them with cc/CC?
What are the differences between a lib generated with cc and the same lib generated with gcc on Solaris?
You can use either the gcc or cc C compilers pretty much interchangeably.
You can mix the g++ and CC C++ compilers in certain ways, but only on x86 Solaris and if your CC compiler is new enough to have the -compat=g option available.
The GNU g++ and the Solaris Studio CC C++ compilers default to completely different ABIs and C++ run-time libraries. On x86 Solaris platforms, newer versions (since version 12.?, if I remember correctly) provide a -compat=g option to use the g++ ABI and run-time libraries. The Studio 12.4 CC compiler adds a -std=v option to select different versions of the g++ or Sun C++ ABI and run-time libraries:
c++03 (zero-3, not oh-3)
Equivalent to the -compat=g option. It selects C++ 03 dialect and g++ ABI; it is binary compatible with g++ on Solaris and Linux It
sets the __SUNPRO_CC_COMPAT preprocessor macro to 'G'.
c++11
Selects C++ 11 dialect and g++ binary compatibility. It sets the __SUNPRO_CC_COMPAT preprocessor macro to 'G'.
c++0x (zero-x, not oh-x)
Equivalent to c++11.
and
The -std=c++03 provides compatibility with the gcc/g++ compiler on
all Oracle Solaris and Linux platforms.
With -std=c++03, binary compatibility extends only to shared
(dynamic or .so) libraries, not to individual .o files or archive (.a)
libraries. The gcc headers and libraries used are those provided with
the compiler, rather than the version of gcc installed on the system.
Note that the Studio 12.4 CC compiler uses the g++ headers and libraries supplied bundled with the CC compiler itself. 12.3 and earlier use the g++ headers and libraries installed on the system under /usr/sfw.
On SPARC Solaris, you have to use either g++ or CC for the entire application.

cannot compile C program with GCC on Mac and -masm=intel

I'm trying to compile a C program that has some inline assembly code in Intel format. I'm using GCC 4.9 (installed via Homebrew) on Mac 10.9, and the compiler flags:
gcc-4.9 -m32 -masm=intel -std=gnu99 get_rating.c
Unfortunately I get an error:
error: -masm=intel not supported in this configuration
I've tried many different combinations of the flags, but I keep getting that error. I can't leave out the -masm=intel flag, because the code I'm trying to compile uses Intel.
How can I compile the program? Is it at all possible on my Mac (version 10.9) or do I need to run a virtual machine?
The GCC docs state that Darwin does not support intel, so it seems you are out of luck with the direct approach. Virtual machine as you suggested, cross compiling, converting the assembler to att, and replacing the assembler with C are among your options - which is best for you you'll have to figure out.
HTH

how to compile c code for vle powerpc using gnu gcc

i want to compile my c code in vle PowerPc instructions. how can i do so using gnu gcc or codebench csgnu gcc? i tried -eabi=vle but the resulting code did not contain valid vle instructions.
thanx
There are currently the following third-party GCC VLE toolchains available: NXP (S32), Mentro (CodeSourcery) and STM (SPC5-Studio).
Try -mvle

Build gcc for running on arm

I have some issue with Linaro gcc. Durig build arm image gcc package was included. But as result gcc command work but there are no headers and no crtl1.o.
Could someone suggest me how build image with full working gcc toolchain for arm.
P.S. I don't need crossplatform compiler on linux target. It should be working gcc on arm platform (on board).

Resources