ituglib / ituglib-build

Build scripts for ITUGLIB pipelines
MIT License
2 stars 0 forks source link

[Feature] 64-bit FLOSS Build. #10

Open rsbeckerca opened 3 years ago

rsbeckerca commented 3 years ago

We need some new FLOSS builds:

  1. a 32-bit FLOSS unthreaded (have this one)
  2. a 64-bit FLOSS unthreaded (need this one)
  3. a 64-bit FLOSS SPT build (need this one for OpenSSL)
  4. a 64-bit FLOSS PUT build (not sure about this one since OpenSSL should not need FLOSS other than for SPT).
Jojo-Schmitz commented 3 years ago

What seems to be required (for 64-bit FLOSS unthreaded) is:

  1. Adding -Wlp64 to CFLAGS`` in Makefile and tests/Makefile
  2. a) Adding/modifying some cast ((short _ptr32 *)and (char _ptr32 *)) to mntent.c and utent.c, for the SPI programming used there. b) (Understand and) Fix the compiler warnings in above mentioned files.
  3. Somehow (?) changing the names of libfloss.a and libfloss.so to reflect that they are for 64bit.
  4. Adjust (or add?) conf_script_floss_cc-64 to make sure those libs get used.
  5. Use that conf_script_floss_cc-64 for builds that should be made 64bit

Alternative to 4. and 5. is to pass a -Wlp64 option to the regular conf_script_floss_cc, and make that aware to link to the correct libs.

I have done steps 1. and 2. a) and got it to build, but I haven't done any testing

I think the steps for an SPT and PUT version might be similar.

rsbeckerca commented 3 years ago

I like the -lp64 option to conf_script_floss_cc.

Also libfloss64.a, libfloss64.so. Probably libfloss_spt.a, libfloss_spt.so.

I think those are the priorities. We don't build anything else with PUT that uses floss - with the exception of Ruby but that's not officially released.

Jojo-Schmitz commented 3 years ago

Hmm, seems what I have as conf_script_floss_cc-64 uses a different lib and bin and sbin directories, (with a 64 appended) rather than different lib names

rsbeckerca commented 3 years ago

Hmm, seems what I have as conf_script_floss_cc-64 uses a different lib and bin and sbin directories, (with a 64 appended) rather than different lib names

Sounds like the same strategy as OpenSSL. I’m ok with that. It means -L has to change.

Jojo-Schmitz commented 3 years ago

Which is what conf_script_floss_cc-64 takes care of, I think:

#!/bin/sh

# Front-end for GNU configure script using Floss and cc

[ -z "$PREFIX" ] && export PREFIX="/usr/local"

[ -z "$CC" ] && export CC="cc"

[ -z "$CXX" ] && export CXX="c++"

[ -z "$CPP" ] && export CPP="cpp"

if [ -z "$CFLAGS" ]
then
        export CFLAGS="-Wlp64"
else
        export CFLAGS="$CFLAGS -Wlp64"
fi
./configure --prefix="$PREFIX" --bindir="$PREFIX"/bin64 --sbindir="$PREFIX"/sbin64 --libexecdir="$PREFIX"/libexec64 --libdir="$PREFIX"/lib64 "$@" 2>/dev/null ||
./configure --prefix="$PREFIX" --eprefix=="$PREFIX"/bin64 --libdir="$PREFIX"/lib64 --sharedlibdir="$PREFIX"/lib64 "$@"