[Git][ghc/ghc][wip/alpine-i386] 4 commits: gitlab-ci: Bump ci-images

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Thu Nov 21 18:24:36 UTC 2024



Ben Gamari pushed to branch wip/alpine-i386 at Glasgow Haskell Compiler / GHC


Commits:
2c73ddf0 by Ben Gamari at 2024-11-21T13:24:15-05:00
gitlab-ci: Bump ci-images

For introduction of Alpine/i386 image.

Thanks to Julian for the base image.

Co-Authored-By: Julian Ospald <hasufell at hasufell.de>

- - - - -
991207c3 by Ben Gamari at 2024-11-21T13:24:18-05:00
gitlab-ci: Add release job for i386/Alpine

As requested by Julian and Mikolaj.

- - - - -
2c8899b3 by Ben Gamari at 2024-11-21T13:24:18-05:00
rts/linker/Elf: Resolve _GLOBAL_OFFSET_TABLE_

- - - - -
7ebbd0fd by Ben Gamari at 2024-11-21T13:24:18-05:00
gitlab-ci: Mark i386 Alpine test breakages

Marks the following tests as broken on i386/Alpine:

 * T22033 due to #25497
 * simd009, T25062_V16, T25169, T22187_run due to #25498

- - - - -


4 changed files:

- .gitlab-ci.yml
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- rts/Linker.c


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -2,7 +2,7 @@ variables:
   GIT_SSL_NO_VERIFY: "1"
 
   # Commit of ghc/ci-images repository from which to pull Docker images
-  DOCKER_REV: efc1ab81236eb37e20cb287ec77aebb6c6341098
+  DOCKER_REV: eb4d3389fd62e4f7321a0c8799014ec1f4da0708
 
   # Sequential version number of all cached things.
   # Bump to invalidate GitLab CI cache.


=====================================
.gitlab/generate-ci/gen_ci.hs
=====================================
@@ -415,6 +415,13 @@ type Variables = MonoidalMap String [String]
 (=:) :: String -> String -> Variables
 a =: b = MonoidalMap (Map.singleton a [b])
 
+type TestName = String
+
+brokenTest :: TestName -- ^ test name
+           -> String -- ^ explanation of breakage
+           -> Variables
+brokenTest test _why = "BROKEN_TESTS" =: test
+
 opsysVariables :: Arch -> Opsys -> Variables
 opsysVariables _ FreeBSD13 = mconcat
   [ -- N.B. we use iconv from ports as I see linker errors when we attempt
@@ -463,13 +470,16 @@ alpineVariables arch = mconcat $
   [ -- Due to #20266
     "CONFIGURE_ARGS" =: "--disable-ld-override"
   , "INSTALL_CONFIGURE_ARGS" =: "--disable-ld-override"
-    -- encoding004: due to lack of locale support
-    -- T10458, ghcilink002: due to #17869
-  , "BROKEN_TESTS" =: "encoding004 T10458"
+  , brokenTest "encoding004" "due to lack of locale support"
+  , brokenTest "T10458" "#17869"
+  ] ++
+  [ mconcat [ brokenTest test "#25498" | test <- ["simd009", "T25062_V16", "T25169", "T22187_run"] ]
+  | I386 <- [arch]
   ] ++
+  [ brokenTest "T22033" "#25497" | I386 <- [arch] ] ++
   [-- Bootstrap compiler has incorrectly configured target triple #25200
     "CONFIGURE_ARGS" =: "--enable-ignore-build-platform-mismatch --build=aarch64-unknown-linux --host=aarch64-unknown-linux --target=aarch64-unknown-linux"
-    |  AArch64 <- [arch]
+  | AArch64 <- [arch]
   ]
 
 
@@ -479,7 +489,7 @@ distroVariables arch Alpine318 = alpineVariables arch
 distroVariables arch Alpine320 = alpineVariables arch
 distroVariables _ Centos7 = mconcat [
     "HADRIAN_ARGS" =: "--docs=no-sphinx"
-  , "BROKEN_TESTS" =: "T22012" -- due to #23979
+  , brokenTest "T22012" "#23979"
   ]
 distroVariables _ Fedora33 = mconcat
   -- LLC/OPT do not work for some reason in our fedora images
@@ -1138,6 +1148,7 @@ alpine_x86 =
   -- Dynamically linked build, suitable for building your own static executables on alpine
   , disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine312) (splitSectionsBroken vanilla))
   , disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine320) (splitSectionsBroken vanilla))
+  , allowFailureGroup (standardBuildsWithConfig I386 (Linux Alpine320) (splitSectionsBroken vanilla))
   ]
   where
     -- ghcilink002 broken due to #17869


=====================================
.gitlab/jobs.yaml
=====================================
@@ -315,6 +315,69 @@
       "TEST_ENV": "aarch64-linux-deb12-validate+llvm"
     }
   },
+  "i386-linux-alpine3_20-validate": {
+    "after_script": [
+      ".gitlab/ci.sh save_cache",
+      ".gitlab/ci.sh save_test_output",
+      ".gitlab/ci.sh clean",
+      "cat ci_timings"
+    ],
+    "allow_failure": true,
+    "artifacts": {
+      "expire_in": "2 weeks",
+      "paths": [
+        "ghc-i386-linux-alpine3_20-validate.tar.xz",
+        "junit.xml",
+        "unexpected-test-output.tar.gz"
+      ],
+      "reports": {
+        "junit": "junit.xml"
+      },
+      "when": "always"
+    },
+    "cache": {
+      "key": "i386-linux-alpine3_20-$CACHE_REV",
+      "paths": [
+        "cabal-cache",
+        "toolchain"
+      ]
+    },
+    "dependencies": [],
+    "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-alpine3_20:$DOCKER_REV",
+    "needs": [
+      {
+        "artifacts": false,
+        "job": "hadrian-ghc-in-ghci"
+      }
+    ],
+    "rules": [
+      {
+        "if": "((($ONLY_JOBS) && ($ONLY_JOBS =~ /.*\\bi386-linux-alpine3_20-validate(\\s|$).*/)) || (($ONLY_JOBS == null) && ((($CI_MERGE_REQUEST_LABELS =~ /.*full-ci.*/) || ($CI_MERGE_REQUEST_LABELS =~ /.*marge_bot_batch_merge_job.*/) || ($CI_COMMIT_BRANCH == \"master\") || ($CI_COMMIT_BRANCH =~ /ghc-[0-9]+\\.[0-9]+/))))) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY == null)",
+        "when": "on_success"
+      }
+    ],
+    "script": [
+      "sudo chown ghc:ghc -R .",
+      ".gitlab/ci.sh setup",
+      ".gitlab/ci.sh configure",
+      ".gitlab/ci.sh build_hadrian",
+      ".gitlab/ci.sh test_hadrian"
+    ],
+    "stage": "full-build",
+    "tags": [
+      "x86_64-linux"
+    ],
+    "variables": {
+      "BIGNUM_BACKEND": "gmp",
+      "BIN_DIST_NAME": "ghc-i386-linux-alpine3_20-validate",
+      "BROKEN_TESTS": "encoding004 T10458 simd009 T25062_V16 T25169 T22187_run T22033",
+      "BUILD_FLAVOUR": "validate",
+      "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
+      "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
+      "RUNTEST_ARGS": "",
+      "TEST_ENV": "i386-linux-alpine3_20-validate"
+    }
+  },
   "i386-linux-deb10-validate": {
     "after_script": [
       ".gitlab/ci.sh save_cache",
@@ -759,6 +822,70 @@
       "XZ_OPT": "-9"
     }
   },
+  "nightly-i386-linux-alpine3_20-validate": {
+    "after_script": [
+      ".gitlab/ci.sh save_cache",
+      ".gitlab/ci.sh save_test_output",
+      ".gitlab/ci.sh clean",
+      "cat ci_timings"
+    ],
+    "allow_failure": true,
+    "artifacts": {
+      "expire_in": "8 weeks",
+      "paths": [
+        "ghc-i386-linux-alpine3_20-validate.tar.xz",
+        "junit.xml",
+        "unexpected-test-output.tar.gz"
+      ],
+      "reports": {
+        "junit": "junit.xml"
+      },
+      "when": "always"
+    },
+    "cache": {
+      "key": "i386-linux-alpine3_20-$CACHE_REV",
+      "paths": [
+        "cabal-cache",
+        "toolchain"
+      ]
+    },
+    "dependencies": [],
+    "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-alpine3_20:$DOCKER_REV",
+    "needs": [
+      {
+        "artifacts": false,
+        "job": "hadrian-ghc-in-ghci"
+      }
+    ],
+    "rules": [
+      {
+        "if": "(\"true\" == \"true\") && ($RELEASE_JOB != \"yes\") && ($NIGHTLY)",
+        "when": "on_success"
+      }
+    ],
+    "script": [
+      "sudo chown ghc:ghc -R .",
+      ".gitlab/ci.sh setup",
+      ".gitlab/ci.sh configure",
+      ".gitlab/ci.sh build_hadrian",
+      ".gitlab/ci.sh test_hadrian"
+    ],
+    "stage": "full-build",
+    "tags": [
+      "x86_64-linux"
+    ],
+    "variables": {
+      "BIGNUM_BACKEND": "gmp",
+      "BIN_DIST_NAME": "ghc-i386-linux-alpine3_20-validate",
+      "BROKEN_TESTS": "encoding004 T10458 simd009 T25062_V16 T25169 T22187_run T22033",
+      "BUILD_FLAVOUR": "validate",
+      "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
+      "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
+      "RUNTEST_ARGS": "",
+      "TEST_ENV": "i386-linux-alpine3_20-validate",
+      "XZ_OPT": "-9"
+    }
+  },
   "nightly-i386-linux-deb10-validate": {
     "after_script": [
       ".gitlab/ci.sh save_cache",
@@ -3450,6 +3577,72 @@
       "XZ_OPT": "-9"
     }
   },
+  "release-i386-linux-alpine3_20-release+no_split_sections": {
+    "after_script": [
+      ".gitlab/ci.sh save_cache",
+      ".gitlab/ci.sh save_test_output",
+      ".gitlab/ci.sh clean",
+      "cat ci_timings"
+    ],
+    "allow_failure": true,
+    "artifacts": {
+      "expire_in": "1 year",
+      "paths": [
+        "ghc-i386-linux-alpine3_20-release+no_split_sections.tar.xz",
+        "junit.xml",
+        "unexpected-test-output.tar.gz"
+      ],
+      "reports": {
+        "junit": "junit.xml"
+      },
+      "when": "always"
+    },
+    "cache": {
+      "key": "i386-linux-alpine3_20-$CACHE_REV",
+      "paths": [
+        "cabal-cache",
+        "toolchain"
+      ]
+    },
+    "dependencies": [],
+    "image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-alpine3_20:$DOCKER_REV",
+    "needs": [
+      {
+        "artifacts": false,
+        "job": "hadrian-ghc-in-ghci"
+      }
+    ],
+    "rules": [
+      {
+        "if": "(\"true\" == \"true\") && ($RELEASE_JOB == \"yes\") && ($NIGHTLY == null)",
+        "when": "on_success"
+      }
+    ],
+    "script": [
+      "sudo chown ghc:ghc -R .",
+      ".gitlab/ci.sh setup",
+      ".gitlab/ci.sh configure",
+      ".gitlab/ci.sh build_hadrian",
+      ".gitlab/ci.sh test_hadrian"
+    ],
+    "stage": "full-build",
+    "tags": [
+      "x86_64-linux"
+    ],
+    "variables": {
+      "BIGNUM_BACKEND": "gmp",
+      "BIN_DIST_NAME": "ghc-i386-linux-alpine3_20-release+no_split_sections",
+      "BROKEN_TESTS": "encoding004 T10458 simd009 T25062_V16 T25169 T22187_run T22033",
+      "BUILD_FLAVOUR": "release+no_split_sections",
+      "CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
+      "HADRIAN_ARGS": "--hash-unit-ids",
+      "IGNORE_PERF_FAILURES": "all",
+      "INSTALL_CONFIGURE_ARGS": "--disable-ld-override --enable-strict-ghc-toolchain-check",
+      "RUNTEST_ARGS": "",
+      "TEST_ENV": "i386-linux-alpine3_20-release+no_split_sections",
+      "XZ_OPT": "-9"
+    }
+  },
   "release-i386-linux-deb10-release+no_split_sections": {
     "after_script": [
       ".gitlab/ci.sh save_cache",


=====================================
rts/Linker.c
=====================================
@@ -821,6 +821,13 @@ SymbolAddr* lookupDependentSymbol (SymbolName* lbl, ObjectCode *dependent, SymTy
                 NULL);
     }
 
+#if defined(OBJFORMAT_ELF)
+    // Resolve references to the GOT if we know the origin object
+    if (dependent && strncmp(lbl, "_GLOBAL_OFFSET_TABLE_", 21) == 0) {
+        return dependent->info->got_start;
+    }
+#endif
+
     if (!ghciLookupSymbolInfo(symhash, lbl, &pinfo)) {
         IF_DEBUG(linker_verbose, debugBelch("lookupSymbol: symbol '%s' not found, trying dlsym\n", lbl));
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8901e89a99e7ed9008029c1a4d13f44aee7be554...7ebbd0fdf42261869d74887873bb067015adbbb5

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/8901e89a99e7ed9008029c1a4d13f44aee7be554...7ebbd0fdf42261869d74887873bb067015adbbb5
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241121/83df23f3/attachment-0001.html>


More information about the ghc-commits mailing list