The installation of UDF software and UDF updates use a generic set of system dependent compile and link flags. These provide no or minimal optimization. Executables are built according to the system set up meaning that you will get 32 bit executables on systems which are configured as 32 bit systems even if they support 64 bit operations.
Use of the MakeRc file allows the user to override the default compile options. Compile options which include extensions tailored to a particular CPU can set here and will be used in all builds. This can sometimes lead to significant speed ups. One note: you should not mix 32 and 64 bit builds. You must stick with one or the other for all installs.
The MakeRc file consists of a set of comment and field definition lines. All lines which begin with a # are comment lines. Field definition lines consist of the field ID followed by the definition. The defined compile and link options in the file are only used if the USE_DEFINED field at the top of the file has been uncommented. Any compile or link options set in MakeRc my be ignored within some Makefiles.
The fields which may be set within the MakeRc file are described below.
The MakeRc file as supplied with the base install is defaulted to be unused. It does however contain safe settings for many popular CPU's. The table below shows option settings for several current CPU's. These settings do not contain compiler optimazation (-O#) flags.
| CTYPE | SHARED |
| CBASE | -Wall -pipe -fsigned-char |
| CSYS | -D_UnIx |
| CSO | -fPIC -shared |
| SO_EXT | so |
| LD | ld |
| LD_FLAGS | -shared |
| CADD | -march=k8 -fforce-addr -fweb |
| CTYPE | SHARED |
| CBASE | -Wall -pipe -fsigned-char |
| CSYS | -D_UnIx |
| CSO | -fPIC -shared |
| SO_EXT | so |
| LD | ld |
| LD_FLAGS | -shared |
| CADD | -march=athlon-xp -mfpmath=sse -msse -mmmx -3dnow |
The following assumes that the system is set for 32 bit operations and that the system 64 bit libraries are located in /usr/lib/sparcv9 and /usr/ucblib/sparcv9. You may also need to include these in your LD_LIBRARY_PATH environment varaible setting.
| CTYPE | SHARED |
| CBASE | -Wall -pipe -fsigned-char -m64 |
| CSYS | -D_UnIx |
| CSO | -fPIC -shared |
| SO_EXT | so |
| LD | ld |
| LD_FLAGS | -G -64 -L/usr/lib/sparcv9 -L/usr/ucblib/sparcv9 |
| CADD |
This will result in either a 32 or 64 bit install depending on how your system is configured.
| CTYPE | SHARED |
| CBASE | -Wall -pipe -fsigned-char |
| CSYS | -D_UnIx |
| CSO | -fPIC -shared |
| SO_EXT | so |
| LD | ld |
| LD_FLAGS | -G |
| CADD |
| CTYPE | SHARED |
| CBASE | -Wall -pipe -fsigned-char |
| CSYS | -D_UnIx |
| CSO | -no-cpp-precomp -dynamic -fPIC -fno-common -D_REENTRANT |
| SO_EXT | dylib |
| LD | cc |
| LD_FLAGS | -flat_namespace -undefined suppress -dynamiclib |
| CADD | -mpowerpc |
You may need to change the CADD -m option to match you particular G4 CPU but generally the given setting seems to work generically.
| CTYPE | SHARED |
| CBASE | -Wall -pipe -fsigned-char |
| CSYS | -D_UnIx |
| CSO | -no-cpp-precomp -dynamic -fPIC -fno-common -D_REENTRANT |
| SO_EXT | dylib |
| LD | cc |
| LD_FLAGS | -flat_namespace -undefined suppress -dynamiclib |
| CADD | -mcpu=7450 -maltivec -mabi=altivec -mpowerpc-gfxopt -mstring -mmultiple |
| CTYPE | SHARED |
| CBASE | -Wall -pipe -fsigned-char |
| CSYS | -D_UnIx |
| CSO | -fPIC -shared |
| SO_EXT | sl |
| LD | ld |
| LD_FLAGS | -b -Brestricted +s |
| CADD |
| CTYPE | SHARED |
| CBASE | -Wall -pipe -fsigned-char |
| CSYS | -D_UnIx |
| CSO | -fPIC -shared |
| SO_EXT | so |
| LD | ld |
| LD_FLAGS | -expect_unresolved '*' -shared -all |
| CADD |
This may not be current. As there is a UDF WINDOWS native install now its not been tested for quite some time.
| CTYPE | SHARED |
| CBASE | -Wall -pipe -fsigned-char |
| CSYS | -D_CyGnUsC |
| CSO | -fPIC -shared |
| SO_EXT | so |
| LD | ld |
| LD_FLAGS | -shared |
| CADD | |
| EXT | .exe |
Setting up a 32 bit UDF installation on a 64 bit platform should be done as part of a new or fresh UDF installation. Since you cannot mix 32 and 64 bit libraries all of the UDF packages need to be built under the same compile options.
To see if your system will support a 32 bit compilation issue the command ld -V. This should show elf_i386 as one of the supported emulations. If not it probably means that the system was not set up to support 32 bit emulations.
If your system supports 32 emulations then do the initial UDF install (EasyUDFInstall). Next edit the file $UDFTOOL_HOME/ConFigs/MakeRc. Remove the comment character (#) from the line USE_DEFINED. Next change the definitions CTYPE, CBASE, CSYS, CSO, SO_EXT, LD, LD_FLAGS to match those for the system CPU. (In many cases the current settings are the correct ones and no changes are needed). If there is a CADD definition for your CPU then uncomment it and to that line add -m32. If there isn't a CADD definition create one as CADD -m32. You can add addition settings here if you want to. Last add -melf_i386 to the LD_FLAGS definition and save the file.
Now proceed according to the installation instructions. Update the base installation and add whatever additional packages are needed. All compiled programs and libraries will be elf32 based.
One rare problem that may occur in performing a 32 bit installation on a 64 bit platform is that the linker may not be able to locate the 32 bit versions of the system libraries. In this case it is necessary to locate the directory or directories they are stored under and to add those directories to the LD_LIBRARY_PATH environment variable.