Commit Graph

33 Commits

Author SHA1 Message Date
sv99
d9a754e5e3
add arm-features.h from glibc source (#12346) 2022-11-25 12:43:37 +01:00
Ali Chraghi
f5f1f8c666 all: rename i386 to x86 2022-11-04 00:09:27 +03:30
Motiejus Jakštys
ea785f70ef glibc/abilists: add libresolv stubs
Generated with https://github.com/ziglang/glibc-abi-tool/pull/2

Fixes #12628
2022-08-25 16:36:10 +03:00
Andrew Kelley
3ed0741718 glibc: clean up build logic
also use the common naming convention for glibc versions ("2.33" rather
than "2-33").

I also verified that these files are exactly identical to the previous
files from before zig updated to glibc 2.34.
2022-01-14 12:39:06 -07:00
xavier
f1b14b91f1 glibc: restore compatibility with glibc<=2.33 for global initializers
__libc_start_main() from glibc.2.33.so or older needs to have a __libc_csu_init function callback parameter.

glibc-2.34 on the other hand has a different __libc_start_main() that does not use it,
and the start.S file from glibc-2.34 no longer construct the init function and pass null when calling __libc_start_main.

So, When targetting an older glibc, use the start.s files as they were in glibc-2.33 and construct the __libc_csu_init function.

fixes #10386 #10512
2022-01-14 11:48:37 -07:00
Andrew Kelley
1b0be5c1ce glibc: update libc-modules.h 2021-12-16 03:33:47 -07:00
Andrew Kelley
e03c951a79 glibc: libc_nonshared.a: add missing includes for inttypes.h
I don't know where glibc thinks uintptr_t is coming from, but here it
is.
2021-12-16 03:01:13 -07:00
Andrew Kelley
37fa6f955d glibc: add stat_t64_cp.c to libnonshared.a
Fixes 32-bit architectures.
2021-12-16 03:01:13 -07:00
Andrew Kelley
bf2bd8e722 glibc: patches to make fstatat.c and fstatat64.c compile
instead of importing every header file under the sun, I copied a couple
inline functions into these files to make them work.
2021-12-16 03:01:13 -07:00
Andrew Kelley
5aeffab693 glibc: import sysdep.h from upstream
it's needed for mipsel-linux-gnueabihf
2021-12-15 19:12:24 -07:00
Andrew Kelley
e977455f7c glibc: improve RISC-V support
* omit crti.o / crtn.o for this architecture
 * add missing entry.h header from upstream
2021-12-15 18:34:27 -07:00
Andrew Kelley
21cffe22d4 glibc: remove duplicate files between generic-glibc/ and glibc/include/ 2021-12-15 18:34:27 -07:00
Andrew Kelley
4d48948b52 glibc: pass -D__GLIBC_MINOR__=XX
instead of hard-coding it. This means that C code has accurate glibc
version information in the preprocessor.
2021-12-15 17:52:27 -07:00
Andrew Kelley
694f424fc7 glibc: update abilists file
This one includes riscv32 and riscv64 targets.
2021-12-15 17:50:44 -07:00
Andrew Kelley
3dcd3612dc glibc: use linux-specific files for nonshared
Upstream, some of the nonshared functions moved to be different for hurd
and for linux. Since our glibc is linux-only we update to use the
linux-specific files.

This fixes std lib tests for x86_64 when linking glibc.
2021-12-15 15:23:56 -07:00
Andrew Kelley
19ca2415f2 update glibc start files to 2.34
This commit introduces tools/update_glibc.zig to update the start files
for next time.

Some notable changes in recent glibc:

 * abi-note.S has been changed to abi-note.c but we resist the change to
   keep it easier to compile the start files.
 * elf-init.c has been deleted upstream. Further testing should be done
   to verify that binaries against glibc omitting elf-init.c still run
   properly on oldel glibc linux systems.

Closes #4926
2021-12-15 14:30:03 -07:00
Andrew Kelley
1442aa7dc0 stage2: improved glibc stubs
This commit upgrades glibc shared library stub-creating code to use the
new abilists file which is generated by the new glibc-abi-tool project:
https://github.com/ziglang/glibc-abi-tool/

The abilists file is different in these ways:
 * It additionally encodes whether a symbol is a function or an object,
   and if it is an object, it additionally encodes the size in bytes.
 * It additionally encodes migrations of symbols from one library to
   another between glibc versions.
 * It is binary data instead of ascii.
 * It is one file instead of three.
 * It is 165 KB instead of 200 KB.

This solves three bugs:

Fixes #7667
Fixes #8714
Fixes #8896
2021-12-13 15:07:53 -08:00
Koakuma
f24d0fbb07 Remove SPARC pthreadtypes-arch.h to match upstream glibc
This is only a temporary measure, we need to properly update the bundled glibc.
2021-05-12 14:54:13 +07:00
LemonBoy
28a9e4c4aa libc: Add workaround for #4926
This change was cherry-picked from an updated version of the sysdep
folder contents, we're still shipping an outdated and incomplete set of
files.
2021-05-11 12:33:47 +02:00
Andrew Kelley
0fee4b55a8 glibc: update ABI files to 2.33 2021-04-04 12:04:02 -07:00
Andrew Kelley
6b7ddfbafe glibc: do not provide -lcrypt
glibc is dropping this functionality moving forward.

This is a partial revert of commit
97c0e1cc41
2020-12-12 12:42:33 -07:00
Andrew Kelley
97c0e1cc41 glibc: additionally provide -lcrypt
also remove redundant "util" string matching.
2020-12-08 13:17:57 -05:00
Andrew Kelley
19d5dfba5f update glibc ABI files to 2.32 2020-08-30 21:28:11 -07:00
Andrew Kelley
fd9f509d6d Revert "Merge pull request #6137 from Jan200101/update/glibc-2.32"
This reverts commit bb9c3118ed, reversing
changes made to 7015d84e0c.

This is missing quite a few headers
2020-08-24 15:19:34 -07:00
Jan200101
53a2431713
update glibc abi list for 2.32 2020-08-22 22:43:01 +02:00
Andrew Kelley
d02838b71a
add libutil to zig's glibc support 2020-04-04 14:43:51 -04:00
Andrew Kelley
245dc9d930
include ld symbols when generating glibc dummy objects
closes #4748
2020-03-20 12:59:37 -04:00
Andrew Kelley
3ff2381042
update glibc source files to 2.31
This is mostly minor modifications to license text.
2020-03-04 14:59:09 -05:00
Andrew Kelley
b21d44f26a
update glibc abilists for 2.31 2020-03-04 00:07:15 -05:00
Andrew Kelley
55202a021a
add missing license files 2019-12-02 16:02:03 -05:00
Andrew Kelley
7101e583d6
update glibc src files to 2.30 2019-09-10 16:40:54 -04:00
Andrew Kelley
b21ad07767
update glibc ABI lists to 2.30 2019-09-07 15:04:09 -04:00
Andrew Kelley
49d1a4c562 move lib dirs to lib subdir
also start prefering NtDll API. so far:
 * NtQueryInformationFile
 * NtClose

adds a performance workaround for windows unicode conversion. but that
should probably be removed before merging
2019-07-15 17:54:50 -04:00