Date: Tue, 4 Jul 2023 19:23:41 -0700 From: Mark Millard <marklmi@yahoo.com> To: FreeBSD Toolchain <freebsd-toolchain@freebsd.org>, freebsd-arm <freebsd-arm@freebsd.org> Cc: Dimitry Andric <dim@FreeBSD.org> Subject: system clang 16 (main, so: 14) use of -m32 on aarch64 gets "-triple" "armv4t-unknown-freebsd14.0"; armv7 native gets "-triple" "armv7-unknown-freebsd14.0-gnueabihf" Message-ID: <ED5D6BE6-BD38-439A-8558-F1B8A2520C75@yahoo.com> References: <ED5D6BE6-BD38-439A-8558-F1B8A2520C75.ref@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I tried the following: # cc -### -std=3Dc11 -m32 main.c FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git = llvmorg-16.0.6-0-g7cbf1a259152) Target: arm-unknown-freebsd14.0 Thread model: posix InstalledDir: /usr/bin "/usr/bin/cc" "-cc1" "-triple" "armv4t-unknown-freebsd14.0" "-emit-obj" = "-mrelax-all" "-disable-free" "-clear-ast-before-backend" = "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" = "main.c" "-mrelocation-model" "static" "-mframe-pointer=3Dall" = "-ffp-contract=3Don" "-fno-rounding-math" "-mconstructor-aliases" = "-funwind-tables=3D2" "-target-cpu" "arm7tdmi" "-target-feature" = "+soft-float" "-target-feature" "+soft-float-abi" "-target-feature" = "-vfp2" "-target-feature" "-vfp2sp" "-target-feature" "-vfp3" = "-target-feature" "-vfp3d16" "-target-feature" "-vfp3d16sp" = "-target-feature" "-vfp3sp" "-target-feature" "-fp16" "-target-feature" = "-vfp4" "-target-feature" "-vfp4d16" "-target-feature" "-vfp4d16sp" = "-target-feature" "-vfp4sp" "-target-feature" "-fp-armv8" = "-target-feature" "-fp-armv8d16" "-target-feature" "-fp-armv8d16sp" = "-target-feature" "-fp-armv8sp" "-target-feature" "-fullfp16" = "-target-feature" "-fp64" "-target-feature" "-d32" "-target-feature" = "-neon" "-target-feature" "-sha2" "-target-feature" "-aes" = "-target-feature" "-dotprod" "-target-feature" "-fp16fml" = "-target-feature" "-bf16" "-target-feature" "-mve" "-target-feature" = "-mve.fp" "-target-feature" "-fpregs" "-target-feature" "+strict-align" = "-target-abi" "aapcs-linux" "-msoft-float" "-mfloat-abi" "soft" = "-Wunaligned-access" "-mllvm" "-treat-scalable-fixed-error-as-warning" = "-debugger-tuning=3Dgdb" = "-fcoverage-compilation-dir=3D/usr/home/root/c_tests" "-resource-dir" = "/usr/lib/clang/16" "-internal-isystem" "/usr/lib/clang/16/include" = "-internal-externc-isystem" "/usr/include" "-std=3Dc11" = "-fdebug-compilation-dir=3D/usr/home/root/c_tests" "-ferror-limit" "19" = "-fno-signed-char" "-fgnuc-version=3D4.2.1" "-fcolor-diagnostics" = "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=3D1" "-o" "/tmp/main-cf3921.o" = "-x" "c" "main.c" "/usr/local/bin/aarch64-unknown-freebsd14.0-ld" "--eh-frame-hdr" = "-dynamic-linker" "/libexec/ld-elf.so.1" "--hash-style=3Dboth" = "--enable-new-dtags" "-o" "a.out" "/usr/lib/crt1.o" "/usr/lib/crti.o" = "/usr/lib/crtbegin.o" "-L/usr/lib" "/tmp/main-cf3921.o" "-lgcc" = "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" = "-lgcc_s" "--no-as-needed" "/usr/lib/crtend.o" "/usr/lib/crtn.o" Note the: "-triple" "armv4t-unknown-freebsd14.0" By contrast, on armv7: # cc -### -std=3Dc11 -m32 main.c FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git = llvmorg-16.0.6-0-g7cbf1a259152) Target: armv7-unknown-freebsd14.0-gnueabihf Thread model: posix InstalledDir: /usr/bin "/usr/bin/cc" "-cc1" "-triple" "armv7-unknown-freebsd14.0-gnueabihf" = "-emit-obj" "-mrelax-all" "-disable-free" "-clear-ast-before-backend" = "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" = "main.c" "-mrelocation-model" "static" "-mframe-pointer=3Dall" = "-ffp-contract=3Don" "-fno-rounding-math" "-mconstructor-aliases" = "-funwind-tables=3D2" "-target-cpu" "cortex-a8" "-target-feature" = "+vfp2" "-target-feature" "+vfp2sp" "-target-feature" "+vfp3" = "-target-feature" "+vfp3d16" "-target-feature" "+vfp3d16sp" = "-target-feature" "+vfp3sp" "-target-feature" "-fp16" "-target-feature" = "-vfp4" "-target-feature" "-vfp4d16" "-target-feature" "-vfp4d16sp" = "-target-feature" "-vfp4sp" "-target-feature" "-fp-armv8" = "-target-feature" "-fp-armv8d16" "-target-feature" "-fp-armv8d16sp" = "-target-feature" "-fp-armv8sp" "-target-feature" "-fullfp16" = "-target-feature" "+fp64" "-target-feature" "+d32" "-target-feature" = "+neon" "-target-feature" "-sha2" "-target-feature" "-aes" = "-target-feature" "-fp16fml" "-target-feature" "+strict-align" = "-target-abi" "aapcs-linux" "-mfloat-abi" "hard" "-Wunaligned-access" = "-mllvm" "-treat-scalable-fixed-error-as-warning" "-debugger-tuning=3Dgdb"= "-fcoverage-compilation-dir=3D/usr/home/root/c_tests" "-resource-dir" = "/usr/lib/clang/16" "-internal-isystem" "/usr/lib/clang/16/include" = "-internal-externc-isystem" "/usr/include" "-std=3Dc11" = "-fdebug-compilation-dir=3D/usr/home/root/c_tests" "-ferror-limit" "19" = "-fno-signed-char" "-fgnuc-version=3D4.2.1" "-fcolor-diagnostics" = "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=3D1" "-o" "/tmp/main-bcccc4.o" = "-x" "c" "main.c" "/usr/bin/ld" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld-elf.so.1" = "--hash-style=3Dboth" "--enable-new-dtags" "-o" "a.out" = "/usr/lib/crt1.o" "/usr/lib/crti.o" "/usr/lib/crtbegin.o" "-L/usr/lib" = "/tmp/main-bcccc4.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" = "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" = "/usr/lib/crtend.o" "/usr/lib/crtn.o" Note the: "-triple" "armv7-unknown-freebsd14.0-gnueabihf" Also, for native armv7 without the -m32 : # cc -### -std=3Dc11 main.c FreeBSD clang version 16.0.6 (https://github.com/llvm/llvm-project.git = llvmorg-16.0.6-0-g7cbf1a259152) Target: armv7-unknown-freebsd14.0-gnueabihf Thread model: posix InstalledDir: /usr/bin "/usr/bin/cc" "-cc1" "-triple" "armv7-unknown-freebsd14.0-gnueabihf" = "-emit-obj" "-mrelax-all" "-disable-free" "-clear-ast-before-backend" = "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" = "main.c" "-mrelocation-model" "static" "-mframe-pointer=3Dall" = "-ffp-contract=3Don" "-fno-rounding-math" "-mconstructor-aliases" = "-funwind-tables=3D2" "-target-cpu" "cortex-a8" "-target-feature" = "+vfp2" "-target-feature" "+vfp2sp" "-target-feature" "+vfp3" = "-target-feature" "+vfp3d16" "-target-feature" "+vfp3d16sp" = "-target-feature" "+vfp3sp" "-target-feature" "-fp16" "-target-feature" = "-vfp4" "-target-feature" "-vfp4d16" "-target-feature" "-vfp4d16sp" = "-target-feature" "-vfp4sp" "-target-feature" "-fp-armv8" = "-target-feature" "-fp-armv8d16" "-target-feature" "-fp-armv8d16sp" = "-target-feature" "-fp-armv8sp" "-target-feature" "-fullfp16" = "-target-feature" "+fp64" "-target-feature" "+d32" "-target-feature" = "+neon" "-target-feature" "-sha2" "-target-feature" "-aes" = "-target-feature" "-fp16fml" "-target-feature" "+strict-align" = "-target-abi" "aapcs-linux" "-mfloat-abi" "hard" "-Wunaligned-access" = "-mllvm" "-treat-scalable-fixed-error-as-warning" "-debugger-tuning=3Dgdb"= "-fcoverage-compilation-dir=3D/usr/home/root/c_tests" "-resource-dir" = "/usr/lib/clang/16" "-internal-isystem" "/usr/lib/clang/16/include" = "-internal-externc-isystem" "/usr/include" "-std=3Dc11" = "-fdebug-compilation-dir=3D/usr/home/root/c_tests" "-ferror-limit" "19" = "-fno-signed-char" "-fgnuc-version=3D4.2.1" "-fcolor-diagnostics" = "-faddrsig" "-D__GCC_HAVE_DWARF2_CFI_ASM=3D1" "-o" "/tmp/main-67ecf8.o" = "-x" "c" "main.c" "/usr/bin/ld" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld-elf.so.1" = "--hash-style=3Dboth" "--enable-new-dtags" "-o" "a.out" = "/usr/lib/crt1.o" "/usr/lib/crti.o" "/usr/lib/crtbegin.o" "-L/usr/lib" = "/tmp/main-67ecf8.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" = "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" = "/usr/lib/crtend.o" "/usr/lib/crtn.o" Again the: "-triple" "armv7-unknown-freebsd14.0-gnueabihf" I'm guessing that for FreeBSD aarch64 -m32 producing "-triple" "armv4t-unknown-freebsd14.0" is inappropriate and "-triple" "armv7-unknown-freebsd14.0-gnueabihf" should be the default for aarch64's -m32 . =3D=3D=3D Mark Millard marklmi at yahoo.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ED5D6BE6-BD38-439A-8558-F1B8A2520C75>