Re: Deprecation of i386 and 32-bit powerpc for 15.0 [ an aarch64/armv7 context note for -m32 ]

Mark Millard <[email protected]>
Newsgroups gmane.os.freebsd.architechture
Message-ID <[email protected]>
Konstantin Belousov <kostikbel_at_gmail.com> wrote on
Date: Sun, 22 Jun 2025 02:55:15 UTC :

> On Sat, Jun 21, 2025 at 06:39:03PM -0700, Rodney W. Grimes wrote:
> > . . .
> 
> The i386 world on amd64 kernel is the supported configuration, and I
> will put the efforts to keep this going. Simultaneously, there is not
> much value in the full world for i386, lib32 + cc -m32 is the most
> interesting thing for me and perhaps, practically, for all other people
> who really use 32bit (as opposed to use it for flaming on ml).
> 
> . . .

In this area, but for aarch64/armv7 instead of amd64/i386:

# cc -v -m32 basic_double_use.c

in an aarch64 context reports using:

"/usr/bin/cc" -cc1 -triple armv4t-unknown-freebsd15.0

So: not armv7 and no -gnueabihf

The context has:

# cc -v
FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2)
Target: aarch64-unknown-freebsd15.0
Thread model: posix
InstalledDir: /usr/bin
Build config: +assertions

By contrast, in an armv7 context:

# cc -v
FreeBSD clang version 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd708029e0b2)
Target: armv7-unknown-freebsd15.0-gnueabihf
Thread model: posix
InstalledDir: /usr/bin
Build config: +assertions

But . . .

# cc -v -m32 basic_double_use.c

reports using:

"/usr/bin/cc" -cc1 -triple armv7-unknown-freebsd15.0-gnueabihf . . .

as expected: armv7 and -gnueabihf in use. 

Thus on aarch64, one needs to be explicit about -target ,
unlike on armv7:

# cc -v -m32 -target armv7-unknown-freebsd15.0-gnueabihf basic_double_use.c

reports using:

"/usr/bin/cc" -cc1 -triple armv7-unknown-freebsd15.0-gnueabihf

In summary: -m32 ends up with the wrong default -target
for the modern aarch64 FreeBSD type of context.


For reference:

# cat basic_double_use.c
int main(void)
{
    volatile double a=10;
    volatile double b=13;
    return (a*b<b/a) ? 0 : 1;
}


I've updated https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=272806
with a version of these notes, as they should be clearer than my
original submittal for the issue.


===
Mark Millard
marklmi at yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.