-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Ports: ObjFW usability issues #20274
Comments
FWIW to build with clang as the cross-compiler going: # Get a serenity build built with clang 16.0.6
./Meta/serenity.sh run x86_64 Clang
# Setup shell for building Clang ports
export SERENITY_TOOLCHAIN=Clang
# Build ports
cd Ports/ObjFW && ./package.sh
cd Ports/llvm && ./package.sh
# If no shell fix yet, edit Meta/build-root-filesystem.sh line 195-196 to:
# printf "installing shortcuts... "
# ln -sf /usr/local/bin/bash mnt/bin/sh
# and install Bash:
cd Ports/bash && ./package.sh (not being able to remount /bin /bin as rw anymore is also a separate issue 😬 ) |
Ah, that's a very interesting point. Usually, these tools are used in order to cross-compile applications using ObjFW, so they keep the host triple. It's not often that you cross-compile ObjFW itself, but then build an application on the "host" rather than the "build". How is this handled for other ports that use autoconf? |
I'd expect ObjFW to respect build/host/target machine options. In this case, we have:
As I understand it, currently the ports script passes |
That being said, it is a bit unclear how we want this to work. Do we want to use this to cross-compile more ObjFW-using software from the "host" to Serenity? Do we want to compile more software on Serenity, using ObjFW? |
Should be fixed by #20279. |
Well, the way the port is currently setup, it will compile with --target and --host as serenity. If we wanted to have --host as your standard Unix system and --target as serenity for a true cross-compiler, rather than a cross-build, we would have to change the port script to accommodate that. The default I think for most compiler tools we want the ability to do both, but It's not clear how to set that up properly without sprinkling more and more shell scripts in Toolchain/ |
Thinking of it some more, I don't think it's even possible to cross-compile it and then use the host compiler on the host. Because when doing this, it never ever sees the host compiler, so knows nothing about it. configure cannot check for flags, bugs, etc. in the host compiler this way. I think not even canadian cross allows this for GNU tools. |
When we install the ObjFW port there's a few issues:
llvm
as a required dependencyobjfw-compile
,objfw-embed
andobjfw-config
are prefixed withx86_64-pc-serenity-
which is a bit awkward for what will be a native compiler on the target.objfw-config
script lists OBJCC asx86_64-pc-serenity-clang
, which is not what the installed port of Clang will be on the target (it's just/usr/local/bin/clang
as installed)This is probably(?) because we compile it with
x86_64-pc-serenity-clang
on the host, but that doesn't line up with what the environment will be at runtime.The scripts also use
if !
, which is not supported by/bin/Shell --posix
, but Ali mentioned to me on discord that he was already looking at that one as a bug report to Shell.cc @bugaevc @Midar
The text was updated successfully, but these errors were encountered: