From 338a8215fd66893e4910bac8528d1243ff976ee0 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Fri, 27 Jan 2023 21:18:46 -0500 Subject: [PATCH] this builds --- projects/gnu.org/gcc/package.yml | 1 + projects/gnu.org/glibc/cc-version-10+.diff | 11 -- projects/gnu.org/glibc/package.yml | 128 ++++++++++++++++++--- 3 files changed, 110 insertions(+), 30 deletions(-) delete mode 100644 projects/gnu.org/glibc/cc-version-10+.diff diff --git a/projects/gnu.org/gcc/package.yml b/projects/gnu.org/gcc/package.yml index d44be4f84a..0f48c6b40b 100644 --- a/projects/gnu.org/gcc/package.yml +++ b/projects/gnu.org/gcc/package.yml @@ -21,6 +21,7 @@ build: gnu.org/make: '*' perl.org: '^5.6.1' gnu.org/patch: '*' + curl.se: '*' working-directory: build script: | # Branch from the Darwin maintainer of GCC, with a few generic fixes and diff --git a/projects/gnu.org/glibc/cc-version-10+.diff b/projects/gnu.org/glibc/cc-version-10+.diff deleted file mode 100644 index b77273d451..0000000000 --- a/projects/gnu.org/glibc/cc-version-10+.diff +++ /dev/null @@ -1,11 +0,0 @@ -diff -ru a/configure b/configure ---- a/configure 2023-01-18 00:31:51.985829010 +0000 -+++ b/configure 2023-01-18 00:32:44.298646006 +0000 -@@ -4710,7 +4710,7 @@ - ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* ) -+ 4.[4-9].* | 4.[1-9][0-9].* | [5-9].* | [1-9][0-9].* ) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; \ No newline at end of file diff --git a/projects/gnu.org/glibc/package.yml b/projects/gnu.org/glibc/package.yml index d9d1013edc..8284594352 100644 --- a/projects/gnu.org/glibc/package.yml +++ b/projects/gnu.org/glibc/package.yml @@ -4,19 +4,27 @@ distributable: versions: #TODO HTML listing: https://ftp.gnu.org/gnu/glibc/ - - 2.24 # This is 2014; it should allow us to support just about anything running. + - 2.28 + +runtime: + env: + PATH: ${{prefix}}/sbin:$PATH + # FIXME: version.raw not recognized here + #CFLAGS: -Wl,--dynamic-linker={{prefix}}/lib/ld-{{version.raw}}.so + CFLAGS: -Wl,--dynamic-linker={{prefix}}/lib/ld-2.28.so build: dependencies: gnu.org/make: '>=3.79' gnu.org/gawk: '>=3' gnu.org/gcc: '*' - gnu.org/binutils: '*' - gnu.org/texinfo: '*' gnu.org/gettext: '*' + gnu.org/texinfo: '*' + gnu.org/bison: '*' gnu.org/patch: '*' perl.org: '*' curl.se: '*' + working-directory: build script: | if test "{{hw.platform}}" != "linux"; then echo "glibc is only supported on Linux" @@ -24,38 +32,120 @@ build: exit 0 fi - # ./configure doesn't recognize $CC versions >9.x - patch -p1 + #include + #include + #include + #include + + atomic_int acnt; + int cnt; + + int f(void* thr_data) { + for(int n = 0; n < 1000; ++n) { + ++cnt; + ++acnt; + } + return 0; + } + + int main(int argc, char **argv) { + /* Basic library version check. */ + printf("gnu_get_libc_version() = %s\n", gnu_get_libc_version()); + + thrd_t thr[10]; + for(int n = 0; n < 10; ++n) + thrd_create(&thr[n], f, NULL); + for(int n = 0; n < 10; ++n) + thrd_join(thr[n], NULL); + printf("The atomic counter is %u\n", acnt); + printf("The non-atomic counter is %u\n", cnt); + } -test: false +provides: + - bin/catchsegv + - bin/gencat + - bin/getconf + - bin/getent + - bin/iconv + - bin/ldd + - bin/locale + - bin/localedef + - bin/makedb + - bin/mtrace + - bin/pcprofiledump + - bin/pldd + - bin/rpcgen + - bin/sotruss + - bin/sprof + - bin/tzselect + - bin/xtrace - sbin/iconvconfig + - sbin/ldconfig + - sbin/nscd + - sbin/sln + - sbin/zdump + - sbin/zic