Since version 11.2, Oracle has canceled lib32Directory under ORACLE_HOME, and has gone from a 3366bit dual-track to a 64bit single track. For some people who want to use 32bit, the solution is to install a 32bit OracleClient. (Of course, another ORACLEHOME is generated this time. This should be okay, but I did not try it.
Since version 11.2, Oracle has canceled the lib32 Directory under ORACLE_HOME, and has gone from a 32/64-bit dual-track to a 64-bit single-track route. For some people who want to use 32bit, the solution is to install a 32bit Oracle Client. (Of course, this time generates another oracle home. This should be okay, but I did not try it.
Since version 11.2, Oracle has canceled the lib32 Directory under ORACLE_HOME, and has gone from a 32/64-bit dual-track to a 64-bit single-track route.
For some people who want to use 32bit, the solution is to install a 32bit Oracle Client. (Of course, this time generates another oracle home. This should be okay, but I have never tried it .)
However, the problem I encountered is that users want to upgrade to 64bit, from the original cc to gcc, but do not want to modify a large number of make files.
1. Install the gcc package.
First, search for gcc.
# Pkg search gcc
INDEX ACTION VALUE PACKAGE
Pkg. description set GCC Runtime-Shared libraries used by gcc and other gnu components pkg:/system/library/gcc-3-runtime@3.4.3-0.175.0.0.0.2.537
Pkg. summary set GCC Runtime libraries pkg:/system/libraries/gcc-3-runtime@3.4.3-0.175.0.0.0.2.537
Pkg. summary set GCC-4.5 Compilers pkg:/developer/gcc-45@4.5.2-0.175.0.0.0.2.537
Pkg. summary set GCC-4.5 Runtime pkg:/system/library/gcc-45-runtime@4.5.2-0.175.0.0.0.2.537
Basename hardlink usr/sfw/bin/gcc pkg:/developer/gcc-3@3.4.3-0.175.0.0.0.2.537
Basename link usr/bin/gcc pkg:/developer/gcc-45@4.5.2-0.175.0.0.0.2.537
Pkg. description set GCC Runtime-Shared libraries used by gcc and other gnu components pkg:/system/library/gcc-3-runtime@3.4.3-0.175.0.0.0.2.537
Pkg. summary set gcc-The gnu c compiler pkg:/developer/gcc-3@3.4.3-0.175.0.0.0.2.537
Basename dir usr/gcc pkg:/system/library/gcc-45-runtime@4.5.2-0.175.0.0.0.2.537
Basename dir usr/gcc/4.5/lib/gcc pkg:/system/library/gcc-45-runtime@4.5.2-0.175.0.0.0.2.537
Basename dir usr/sfw/lib/gcc pkg:/developer/gcc-3@3.4.3-0.175.0.0.0.2.537
Basename dir usr/sfw/libexec/gcc pkg:/developer/gcc-3@3.4.3-0.175.0.0.0.2.537
Basename dir usr/gcc pkg:/developer/gcc-45@4.5.2-0.175.0.0.0.2.537
Basename dir usr/gcc/4.5/lib/gcc pkg:/developer/gcc-45@4.5.2-0.175.0.0.0.2.537
Basename file usr/gcc/4.5/bin/gcc pkg:/developer/gcc-45@4.5.2-0.175.0.0.0.2.537
The gcc Package information of several versions is provided here.
For example, you want to install gcc compiler of version 3.4.3.
# Pkg install pkg:/developer/gcc-3@3.4.3-0.175.0.0.0.2.537
2. Create a cc file without modifying the make File
The following is an example (partial) of the Make file using the original Unix cc ).
# Makefile
PROC = proc
CC = cc
INCLUDE =-I $ {ORACLE_HOME}/precomp/public-I ../inc
INC =$ {HOME}/JBP/src/inc/
OBJ =$ {HOME}/JBP/src/obj/
......
Where is the installed gcc?
# Which gcc
/Usr/sfw/bin/gcc
Make a cc file with the following simple content:
/Usr/sfw/bin/gcc-m64 $ *
Note: Here-m64 indicates that gcc generates 64-bit compilation code.
$ * Receives all parameters after cc.
Cc must be executable.
# Ls-l cc
-Rwxr-xr-x 1 root 25 Nov 6 14:21 cc
3. Verify
$ Echo $ SHELL
/Usr/bin/bash
$ Echo $ PATH
/Usr/bin:/usr/sbin:/usr/sfw/bin
$ Which cc
/Usr/sfw/bin/cc
$ More test. c
# Include
Int main (void ){
Printf ("Content-type: text/plain \ n ");
Printf ("Hello, World! ");
Return 0;
}
$ Cc test. c
$ Ls-ltr
Total 15
-Rw-r -- 1 zhang staff 130 November 5 test. c
-Rwxr-xr-x 1 zhang staff 9992 November 7 a. out
$ File a. out
A. out: ELF 64-bit LSB executable AMD64 Version 1, dynamically linked, not stripped, no debugging information available
It can be seen that the Object file generated by using the gcc alias is 64bit.
Similarly, there is no exception in using the make file to compile the link.