Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] 64-bit FLOSS Build. #10

Open
rsbeckerca opened this issue Oct 29, 2020 · 5 comments
Open

[Feature] 64-bit FLOSS Build. #10

rsbeckerca opened this issue Oct 29, 2020 · 5 comments

Comments

@rsbeckerca
Copy link
Member

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
Copy link
Member

Jojo-Schmitz commented Oct 29, 2020

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
Copy link
Member Author

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
Copy link
Member

Jojo-Schmitz commented Oct 29, 2020

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
Copy link
Member Author

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
Copy link
Member

Jojo-Schmitz commented Oct 29, 2020

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 "$@"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants