Enable runtime byte-order selection for aarch64-linux-user and retain qemu-aarch64_be as a compatibility symlink. Deprecate the symlink since 12.0 and recommend qemu-aarch64 for both ELF byte orders. Remove the separate aarch64_be-linux-user build target and obsolete CI exclusions.
Run the existing big-endian hello test through qemu-aarch64 while retaining its big-endian fixture toolchain. Document that executable name compatibility does not preserve the removed target-list spelling. Signed-off-by: Philippe Mathieu-Daudé <[email protected]> --- docs/about/deprecated.rst | 13 +++++++++++++ docs/user/main.rst | 8 ++++++++ configure | 9 ++++++++- configs/targets/aarch64-linux-user.mak | 2 ++ configs/targets/aarch64_be-linux-user.mak | 10 ---------- .gitlab-ci.d/buildtest.yml | 2 +- .gitlab-ci.d/crossbuild-template.yml | 4 ++-- tests/tcg/aarch64_be/meson.build | 4 ++-- 8 files changed, 36 insertions(+), 16 deletions(-) delete mode 100644 configs/targets/aarch64_be-linux-user.mak diff --git a/docs/about/deprecated.rst b/docs/about/deprecated.rst index 0891bbc44ded..715a72d8b117 100644 --- a/docs/about/deprecated.rst +++ b/docs/about/deprecated.rst @@ -438,6 +438,19 @@ It was implemented as a no-op instruction in TCG up to QEMU 9.0, but only with ``-cpu max`` (which does not guarantee migration compatibility across versions). +linux-user mode executables +--------------------------- + +.. _deprecated-qemu-aarch64-be: + +``qemu-aarch64_be`` executable name (since 12.0) +'''''''''''''''''''''''''''''''''''''''''''''''' + +The ``qemu-aarch64_be`` compatibility symlink is deprecated. +Use ``qemu-aarch64`` instead for both little- and big-endian +Linux ELF executables. The emulator selects the endianness from +the ELF header, regardless of the executable name used to invoke it. + linux-user mode CPUs -------------------- diff --git a/docs/user/main.rst b/docs/user/main.rst index a8ddf9142495..c9b4204dcf9d 100644 --- a/docs/user/main.rst +++ b/docs/user/main.rst @@ -65,6 +65,14 @@ emulator. Linux User space emulator ------------------------- +For AArch64, ``qemu-aarch64`` runs both little- and big-endian Linux ELF +executables, selecting the byte order from the ELF header. ``qemu-aarch64_be`` +is a :ref:`deprecated compatibility symlink <deprecated-qemu-aarch64-be>` +to the same emulator; its name does not override the ELF byte order. +Build both names with ``--target-list=aarch64-linux-user``; the separate +``aarch64_be-linux-user`` build target is no longer supported. +For bFLT, which has no byte-order marker, QEMU uses the little-endian default. + Command line options ~~~~~~~~~~~~~~~~~~~~ diff --git a/configure b/configure index af14a9c23efd..821a887a31c1 100755 --- a/configure +++ b/configure @@ -1107,7 +1107,14 @@ else *" $target "*) ;; *) - error_exit "Unknown target name '$target'" + case "$target" in + aarch64_be-linux-user) + error_exit "Target '$target' is no longer supported; use 'aarch64-linux-user' instead" + ;; + *) + error_exit "Unknown target name '$target'" + ;; + esac ;; esac done diff --git a/configs/targets/aarch64-linux-user.mak b/configs/targets/aarch64-linux-user.mak index ddfacc092ddf..efe372021ce8 100644 --- a/configs/targets/aarch64-linux-user.mak +++ b/configs/targets/aarch64-linux-user.mak @@ -1,5 +1,7 @@ TARGET_ARCH=aarch64 TARGET_BASE_ARCH=arm +TARGET_RUNTIME_ENDIAN=y +TARGET_USER_ALIASES=aarch64_be TARGET_XML_FILES= aarch64-core.xml aarch64-fpu.xml aarch64-pauth.xml aarch64-mte.xml aarch64-sme2.xml TARGET_HAS_BFLT=y CONFIG_SEMIHOSTING=y diff --git a/configs/targets/aarch64_be-linux-user.mak b/configs/targets/aarch64_be-linux-user.mak deleted file mode 100644 index 83209fa2ae54..000000000000 --- a/configs/targets/aarch64_be-linux-user.mak +++ /dev/null @@ -1,10 +0,0 @@ -TARGET_ARCH=aarch64 -TARGET_BASE_ARCH=arm -TARGET_BIG_ENDIAN=y -TARGET_XML_FILES= aarch64-core.xml aarch64-fpu.xml aarch64-pauth.xml aarch64-mte.xml aarch64-sme2.xml -TARGET_HAS_BFLT=y -CONFIG_SEMIHOSTING=y -CONFIG_ARM_COMPATIBLE_SEMIHOSTING=y -TARGET_SYSTBL_ABI=common,64,renameat,rlimit,memfd_secret -TARGET_SYSTBL=syscall_64.tbl -TARGET_LONG_BITS=64 diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index b1e95395d0c3..a603c93cb799 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -451,7 +451,7 @@ clang-user: variables: IMAGE: debian-all-test-cross CONFIGURE_ARGS: --cc=clang --cxx=clang++ --disable-system --enable-ubsan - --target-list-exclude=alpha-linux-user,microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user + --target-list-exclude=alpha-linux-user,microblazeel-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user --extra-cflags=-fno-sanitize-recover=undefined MAKE_CHECK_ARGS: check-unit check-tcg diff --git a/.gitlab-ci.d/crossbuild-template.yml b/.gitlab-ci.d/crossbuild-template.yml index 94423814a751..32c11f4895b5 100644 --- a/.gitlab-ci.d/crossbuild-template.yml +++ b/.gitlab-ci.d/crossbuild-template.yml @@ -70,8 +70,8 @@ - cd build - section_start configure "Running configure" - ../configure --enable-werror --disable-docs $QEMU_CONFIGURE_OPTS - --disable-system --target-list-exclude="aarch64_be-linux-user - alpha-linux-user m68k-linux-user microblazeel-linux-user + --disable-system --target-list-exclude="alpha-linux-user + m68k-linux-user microblazeel-linux-user or1k-linux-user ppc-linux-user sparc-linux-user xtensa-linux-user $CROSS_SKIP_TARGETS" - section_end configure diff --git a/tests/tcg/aarch64_be/meson.build b/tests/tcg/aarch64_be/meson.build index c1873cd5606c..08d29a94e702 100644 --- a/tests/tcg/aarch64_be/meson.build +++ b/tests/tcg/aarch64_be/meson.build @@ -6,7 +6,7 @@ tests += { 'hello.c': {'cflags': ['-mbig-endian', '-ffreestanding', '-nostdlib']}, } -if 'qemu-aarch64_be' in emulators +if 'qemu-aarch64' in emulators tcg_tests += { 'aarch64_be-linux-user': { 'cc': 'aarch64-linux-gnu-gcc', @@ -14,7 +14,7 @@ if 'qemu-aarch64_be' in emulators 'cc_dockerfile': 'debian-all-test-cross', 'folder': 'aarch64_be', 'gdb_arch': 'aarch64_be', - 'qemu': emulators['qemu-aarch64_be'], + 'qemu': emulators['qemu-aarch64'], 'tests': tests, } } -- 2.55.0
