Browse Source

Append -headerpad_max_install_names to linker command on OSX

rdb 15 years ago
parent
commit
d1b27a33d8
1 changed files with 2 additions and 2 deletions
  1. 2 2
      makepanda/makepanda.py

+ 2 - 2
makepanda/makepanda.py

@@ -926,14 +926,14 @@ def CompileLink(dll, obj, opts):
         if (GetOrigExt(dll)==".exe"): cmd = 'g++ -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib'
         if (GetOrigExt(dll)==".exe"): cmd = 'g++ -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib'
         else:
         else:
             if (sys.platform == "darwin"):
             if (sys.platform == "darwin"):
-                cmd = 'g++ -undefined dynamic_lookup'
+                cmd = 'g++ -undefined dynamic_lookup -headerpad_max_install_names'
                 if ("BUNDLE" in opts): cmd += ' -bundle '
                 if ("BUNDLE" in opts): cmd += ' -bundle '
                 else:
                 else:
                     cmd += ' -dynamiclib -install_name ' + os.path.basename(dll)
                     cmd += ' -dynamiclib -install_name ' + os.path.basename(dll)
                     cmd += ' -compatibility_version ' + MAJOR_VERSION + ' -current_version ' + VERSION
                     cmd += ' -compatibility_version ' + MAJOR_VERSION + ' -current_version ' + VERSION
                 cmd += ' -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib'
                 cmd += ' -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib'
             else:
             else:
-                cmd = 'g++ -shared'
+                cmd = 'g++ -shared -headerpad_max_install_names'
                 if ("MODULE" not in opts): cmd += " -Wl,-soname=" + os.path.basename(dll)
                 if ("MODULE" not in opts): cmd += " -Wl,-soname=" + os.path.basename(dll)
                 cmd += ' -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib'
                 cmd += ' -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib'
         for x in obj:
         for x in obj: