fix --profile=pprof on newer ubuntus
authorEvan Martin <martine@danga.com>
Mon, 15 Apr 2013 21:41:10 +0000 (14:41 -0700)
committerEvan Martin <martine@danga.com>
Thu, 18 Apr 2013 00:15:36 +0000 (17:15 -0700)
The --as-needed default for ld would drop -lprofiler.

configure.py

index c526c1a..bfcf2ec 100755 (executable)
@@ -166,7 +166,8 @@ else:
         cflags.append('-pg')
         ldflags.append('-pg')
     elif options.profile == 'pprof':
-        libs.append('-lprofiler')
+        cflags.append('-fno-omit-frame-pointer')
+        libs.extend(['-Wl,--no-as-needed', '-lprofiler'])
 
 def shell_escape(str):
     """Escape str such that it's interpreted as a single argument by