Page MenuHomeFreeBSD

arm64 lib32: change clang to allow -m32 on arm64
ClosedPublic

Authored by karels on Jul 8 2023, 10:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 9:27 AM
Unknown Object (File)
Oct 10 2024, 7:17 PM
Unknown Object (File)
Sep 27 2024, 4:19 PM
Unknown Object (File)
Sep 25 2024, 12:18 AM
Unknown Object (File)
Sep 24 2024, 11:27 PM
Unknown Object (File)
Sep 24 2024, 1:49 AM
Unknown Object (File)
Sep 18 2024, 7:49 PM
Unknown Object (File)
Sep 17 2024, 12:23 PM
Subscribers
None

Details

Summary

The FreeBSD driver support for clang tested explicitly for 32-bit
Intel, MIPS, or PowerPC targets where /usr/lib32/libcrt1.o was
present to decide whether -m32 should use /usr/lib32. At jrtc27's
suggestion, simply test for a 32-bit platform rather than adding
arm to the list. This is one step in adding support for -m32 on
arm64.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 52568
Build 49459: arc lint + arc unit

Event Timeline

karels created this revision.

@dim, we need a way to force the make system to bootstrap a compiler with this change, or the lib32 build breaks. Can we change the version string, etc?

Bump lib/clang/freebsd_cc_version.h

Indeed, bumping lib/clang/freebsd_cc_version.h is the way to force a bootstrap clang rebuild. The change to clang/lib/Driver/ToolChains/FreeBSD.cpp should also be upstreamed.

This revision is now accepted and ready to land.Jul 9 2023, 10:03 PM
In D40943#932160, @dim wrote:

Indeed, bumping lib/clang/freebsd_cc_version.h is the way to force a bootstrap clang rebuild. The change to clang/lib/Driver/ToolChains/FreeBSD.cpp should also be upstreamed.

Thanks, I didn't realize that there is a FreeBSD-specific version; that helps.

How do we go about upstreaming?

In D40943#932160, @dim wrote:

Indeed, bumping lib/clang/freebsd_cc_version.h is the way to force a bootstrap clang rebuild. The change to clang/lib/Driver/ToolChains/FreeBSD.cpp should also be upstreamed.

Thanks, I didn't realize that there is a FreeBSD-specific version; that helps.

How do we go about upstreaming?

It's trivial enough I just committed it directly: https://github.com/llvm/llvm-project/commit/3450272fc281979388bb845a9fffb59b42cc2e7e

This revision now requires review to proceed.Jul 11 2023, 7:51 PM
This revision is now accepted and ready to land.Jul 11 2023, 7:53 PM

I've merged this back through llvm13. I'll let the changes settle for a day and then merge to quarterly so CI can use them.

Please add a pointer to the upstream commit when committing this so it's clear this isn't a downstream diff

Please add a pointer to the upstream commit when committing this so it's clear this isn't a downstream diff

Already done in my copy.