3 @@ -209,7 +209,12 @@ static int check_for_privs(void){
7 +#if __GNUC__ < 4 || __GNUC_MINOR__ < 3
8 static void init_libproc(void) __attribute__((constructor));
10 +static void init_libproc(void) __attribute__((constructor(200)));
13 static void init_libproc(void){
14 have_privs = check_for_privs();
15 // ought to count CPUs in /proc/stat instead of relying
18 @@ -33,7 +33,12 @@ void display_version(void) {
20 int linux_version_code;
22 +#if __GNUC__ < 4 || __GNUC_MINOR__ < 3
23 static void init_Linux_version(void) __attribute__((constructor));
25 +static void init_Linux_version(void) __attribute__((constructor(100)));
28 static void init_Linux_version(void) {
29 static struct utsname uts;
30 int x = 0, y = 0, z = 0; /* cleared in case sscanf() < 3 */
33 @@ -76,7 +76,7 @@ proc/$(ANAME): $(LIBOBJ)
35 #proc/$(SONAME): proc/library.map
36 proc/$(SONAME): $(LIBOBJ)
37 - $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -shared -Wl,-soname,$(SONAME) -Wl,--version-script=proc/library.map -o $@ $^ -lc
38 + $(CC) $(ALL_CFLAGS) $(ALL_LDFLAGS) -shared -Wl,-soname,$(SONAME) -Wl,--version-script=proc/library.map -o $@ $(sort $^) -lc
41 # AUTOMATIC DEPENDENCY GENERATION -- GCC AND GNUMAKE DEPENDENT