Merge pull request #245806 from reckenrode/tix-clang16

texlive: fix build with clang 16
This commit is contained in:
Pol Dellaiera
2023-07-29 08:02:59 +02:00
committed by GitHub
2 changed files with 31 additions and 0 deletions
@@ -102,6 +102,12 @@ core = stdenv.mkDerivation rec {
perl
];
patches = [
# Fix implicit `int` on `main`, which results in an error when building with clang 16.
# This is fixed upstream and can be dropped with the 2023 release.
./fix-implicit-int.patch
];
hardeningDisable = [ "format" ];
preConfigure = ''
@@ -224,6 +230,9 @@ core-big = stdenv.mkDerivation { #TODO: upmendex
stripLen = 1;
extraPrefix = "libs/luajit/LuaJIT-src/";
})
# Fix implicit `int` on `main`, which results in an error when building with clang 16.
# This is fixed upstream and can be dropped with the 2023 release.
./fix-implicit-int.patch
];
hardeningDisable = [ "format" ];
@@ -0,0 +1,22 @@
diff -ur a/utils/m-tx/mtx-src/prepmx.c b/utils/m-tx/mtx-src/prepmx.c
--- a/utils/m-tx/mtx-src/prepmx.c 2018-04-28 17:56:18.000000000 -0600
+++ b/utils/m-tx/mtx-src/prepmx.c 2023-07-11 15:21:26.351024424 -0600
@@ -769,6 +769,7 @@
}
+int
main(int argc, Char *argv[])
{ /* ---- Main program ------------------------ */
PASCAL_MAIN(argc, argv);
diff -ur a/utils/pmx/pmx-src/libf2c/main.c b/utils/pmx/pmx-src/libf2c/main.c
--- a/utils/pmx/pmx-src/libf2c/main.c 2016-02-09 22:31:26.000000000 -0700
+++ b/utils/pmx/pmx-src/libf2c/main.c 2023-07-11 15:49:35.043438384 -0600
@@ -106,6 +106,7 @@
#ifdef KR_headers
main(argc, argv) int argc; char **argv;
#else
+int
main(int argc, char **argv)
#endif
{