Skip to contentSkip to conversation

testing/next: random fixes in case useful (gitlab, arm tcg, macos)

PATCH In review Alex Bennée 2 participants 7 messages Jul 23

lore
Share & tools
lore
#0 lore raw

cover testing/next: random fixes in case useful (gitlab, arm tcg, macos)

I'm off for the next two weeks but I thought it would be worth posting these in case they were useful. Feel free to cherry pick what is needed and I'll deal with the rest when I'm back.

Alex.

Alex Bennée (3):
gitlab: use .base_meson_job_template for macOS jobs tests/arm: add explicit CFLAGS for system build
gitlab: add arm-softmmu tests to the macOS build

 .gitlab-ci.d/macos.yml                | 7 ++++---
 tests/tcg/arm/Makefile.softmmu-target | 2 +-
 2 files changed, 5 insertions(+), 4 deletions(-)
Signature · 1 line
2.47.3
#1 lore raw

PATCH 1/3 gitlab: use .base_meson_job_template for macOS jobs

This way we'll get more environmental information which will help with debugging.

---
 .gitlab-ci.d/macos.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
.gitlab-ci.d/macos.yml +1 -1
index 641a48b3832..bdb3eae18f0 100644
@@ -1,5 +1,5 @@
 .macos_job_template:
-  extends: .base_job_template
+  extends: .base_meson_job_template
   stage: build
   tags:
     - saas-macos-large-m2pro
Signature · 1 line
2.47.3
#3 lore raw

PATCH 2/3 tests/arm: add explicit CFLAGS for system build

In reply to Alex Bennée

The brew toolchain on macOS (arm-none-eabi-gcc) is a little different from the default on Debian (arm-linux-gnueabihf-gcc) as a result it defaults to an older architectural baseline (without isb's), assumes softfloat and will get confused by including stdint.h without being told it is compiling freestanding code.

Make these all explicit so we can build arm-softmmu tests on macOS. The test-armv6m-undef is unaffected as it has it's very own build stanza.

---
 tests/tcg/arm/Makefile.softmmu-target | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/tcg/arm/Makefile.softmmu-target +1 -1
index b66074b0b43..3e8a9b4073e 100644
@@ -29,7 +29,7 @@ ARM_TESTS+=$(patsubst $(ARM_SRC)/%.c, %, $(ARM_TEST_SRCS))
 CRT_PATH=$(ARM_SRC)
 LINK_SCRIPT=$(ARM_SRC)/kernel.ld
 LDFLAGS=-Wl,-T$(LINK_SCRIPT)
-CFLAGS+=-nostdlib -ggdb -O0 $(MINILIB_INC)
+CFLAGS+=-march=armv7-a+fp -ffreestanding -nostdlib -ggdb -O0 $(MINILIB_INC)
 LDFLAGS+=-static -nostdlib $(CRT_OBJS) $(MINILIB_OBJS) -lgcc
 
 # building head blobs
Signature · 1 line
2.47.3
Reviewed-by on v1 2/3
#4 lore raw

Re: [PATCH 2/3] tests/arm: add explicit CFLAGS for system build

Quoted 6 lines · Alex Bennée

The brew toolchain on macOS (arm-none-eabi-gcc) is a little different from the default on Debian (arm-linux-gnueabihf-gcc) as a result it defaults to an older architectural baseline (without isb's), assumes softfloat and will get confused by including stdint.h without being told it is compiling freestanding code.

Quoted 9 lines

Make these all explicit so we can build arm-softmmu tests on macOS. The test-armv6m-undef is unaffected as it has it's very own build stanza.

---
 tests/tcg/arm/Makefile.softmmu-target | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
#5 lore raw

PATCH 3/3 gitlab: add arm-softmmu tests to the macOS build

In reply to Alex Bennée

Now we have fixed the compiler issues lets have at it.

---
 .gitlab-ci.d/macos.yml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
.gitlab-ci.d/macos.yml +3 -2
index bdb3eae18f0..40b9b637b3b 100644
@@ -22,7 +22,7 @@
     - export PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
     - brew update
     - brew install $PKGS
-    - brew install aarch64-elf-gcc i686-elf-gcc x86_64-elf-gcc
+    - brew install arm-none-eabi-gcc aarch64-elf-gcc i686-elf-gcc x86_64-elf-gcc
     - if test -n "$PYPI_PKGS" ; then PYLIB=$($PYTHON -c 'import sysconfig; print(sysconfig.get_path("stdlib"))'); rm -f $PYLIB/EXTERNALLY-MANAGED; $PIP3 install --break-system-packages $PYPI_PKGS ; fi
   script:
     - mkdir build
@@ -40,8 +40,9 @@ aarch64-macos-15-build:
     PATH_EXTRA: /opt/homebrew/gettext/bin
     PKG_CONFIG_PATH: /opt/homebrew/curl/lib/pkgconfig:/opt/homebrew/ncurses/lib/pkgconfig:/opt/homebrew/readline/lib/pkgconfig
     CONFIGURE_ARGS:
-        --target-list=aarch64-softmmu,i386-softmmu,x86_64-softmmu
+        --target-list=aarch64-softmmu,arm-softmmu,i386-softmmu,x86_64-softmmu
         --cross-prefix-aarch64=aarch64-elf-
+        --cross-prefix-arm=arm-none-eabi-
         --cross-prefix-i386=i686-elf-
         --cross-prefix-x86_64=x86_64-elf-
         --disable-plugins
Signature · 1 line
2.47.3