Is there a transparent way to force 64-bit gcc compilation on Solaris

Is there a way to force '-m64' not overriding CXXFLAGS/CFLAGS. I want automatic x64 build environment like in Linux/BSD amd64.

Why do I need this?

The problem is complexity of the project I need to be buit as x64 on Solaris. It contains several parts and each may use specific C/C++ compiler flags. So, I can't just run:

CXXFLAGS=-m64 O2 ...
CFLAGS=-m64 -O2 ...

because there are no common C/C++ flags.

All I need is the way to transparently append '-m64' to every gcc/g++ call.


You can write a wrapper (eg: ~/bin/gcc) that would add the required option(s) and put ~/bin first in your PATH. eg:

/usr/sfw/bin/gcc -m64 "$@"

CPPFLAGS is used for the c preprocessor. It should be picked up by both gcc and g++.


Need Your Help

Appstore release affecting TestFlight testers?

ios testing app-store itunesconnect testflight

Say for example internal and external testers under TestFlight are testing the application. Then a live Appstore release that was uploaded previously gets approved. Will the current testers get the...

How to create a Pull-to-Refresh into a listView

android listview

Hey guys i am trying to iumplement those projects