Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 May 2023 14:16:10 -0400 (EDT)
From:      Thomas David Rivers <rivers@dignus.com>
To:        freebsd-arm@freebsd.org, rivers@dignus.com
Subject:   32-bit executables on aarch64?
Message-ID:  <202305181816.34IIGA8P024382@office.dignus.com>

next in thread | raw e-mail | index | archive | help

Tried the following with a small "hello world" program on 
   FreeBSD freebsd 13.2-RELEASE FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC arm64

 # cc -m32 hello.c

To get these errors:

  ld: error: /tmp/hello-1eb3b8.o is incompatible with /usr/lib/crt1.o
  cc: error: linker command failed with exit code 1 (use -v to see invocation)

Is building a 32-bit program not supported on 13.2 arm64?

  man cc

gave me the CLANG doc... which didn't even mention "m32"; so perhaps
I just need a different set of options?   I tried -arch arm but I still
got 64-bit code.  Also, I tried several other -arch options and didn't
see a difference, even with -arch x86, I still got Aarch64 code.

	- Many thanks! -
	- Dave Rivers -

--
rivers@dignus.com                        Work: (919) 676-0847
Get your mainframe programming tools at http://www.dignus.com



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202305181816.34IIGA8P024382>