Browse Source

Ronald Wahl writes:

    since uclibc-0.9.16 I have to specify -fpic during _link_-time or else
    I get an error from the dynamic linker when I load shared objects. Patch
    is appended.
Eric Andersen 22 years ago
parent
commit
3d15bf2ee6
1 changed files with 3 additions and 0 deletions
  1. 3 0
      extra/gcc-uClibc/gcc-uClibc.c

+ 3 - 0
extra/gcc-uClibc/gcc-uClibc.c

@@ -277,6 +277,9 @@ int main(int argc, char **argv)
 					if (strstr(argv[i],static_linking) != NULL) {
 						use_static_linking = 1;
 					}
+					if (strcmp("-shared",argv[i]) == 0) {
+						use_pic = 1;
+					}
 					break;
 				case 'W':		/* -static could be passed directly to ld */
 					if (strncmp("-Wl,",argv[i],4) == 0) {