xcoff dependency list for static libraries
Tom Tromey
tromey@adacore.com
Tue Nov 10 16:18:50 GMT 2020
Tom> So maybe this same treatment could be applied here.
Here's what I'm trying out locally.
If it looks ok to you I can push it into binutils-gdb as well.
thanks,
Tom
commit dfc7da7b74dc620a4a1e854e7eb7c6cc8cb7f24a
Author: Tom Tromey <tromey@adacore.com>
Date: Tue Nov 10 09:15:31 2020 -0700
Fix Windows-x-PPC build
A recent BFD change caused a build failure for a Windows->PPC cross:
ld.exe: ../bfd/libbfd.a(coff-rs6000.o):coff-rs6000.c:(.text+0x4571): undefined reference to `getuid'
ld.exe: ../bfd/libbfd.a(coff-rs6000.o):coff-rs6000.c:(.text+0x457e): undefined reference to `getgid'
This patch fixes the problem by moving the replacement definitions of
getuid and getgid to system.h.
binutils/ChangeLog
* archive.c (getuid, getgid): Move...
* sysdep.h (getuid, getgid): ...here.
diff --git a/bfd/archive.c b/bfd/archive.c
index 1836b9b47e2..0250d6f5f4e 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -1842,14 +1842,6 @@ hpux_uid_gid_encode (char str[6], long int id)
}
#endif /* HPUX_LARGE_AR_IDS */
-#ifndef HAVE_GETUID
-#define getuid() 0
-#endif
-
-#ifndef HAVE_GETGID
-#define getgid() 0
-#endif
-
/* Takes a filename, returns an arelt_data for it, or NULL if it can't
make one. The filename must refer to a filename in the filesystem.
The filename field of the ar_hdr will NOT be initialized. If member
diff --git a/bfd/sysdep.h b/bfd/sysdep.h
index 652857153d3..3891f971e8e 100644
--- a/bfd/sysdep.h
+++ b/bfd/sysdep.h
@@ -223,4 +223,12 @@ size_t strnlen (const char *, size_t);
# define N_(String) (String)
#endif
+#ifndef HAVE_GETUID
+#define getuid() 0
+#endif
+
+#ifndef HAVE_GETGID
+#define getgid() 0
+#endif
+
#endif /* ! defined (BFD_SYSDEP_H) */
More information about the Binutils
mailing list