From: Brett Cannon Date: Fri, 18 Mar 2016 17:29:43 +0000 (-0700) Subject: Issue #26271: Fix the Freeze tool to use variables passed in from the X-Git-Tag: v3.6.0a1~443^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e4044bfe63a239cad9d4c51b02c256c2a160eb66;p=thirdparty%2FPython%2Fcpython.git Issue #26271: Fix the Freeze tool to use variables passed in from the configure script related to compiler flags. Thanks to Daniel Shaulov for the bug report and patch. --- diff --git a/Misc/ACKS b/Misc/ACKS index 85220d131941..3f70eef71c0e 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1326,6 +1326,7 @@ Mark Shannon Ha Shao Richard Shapiro Varun Sharma +Daniel Shaulov Vlad Shcherbina Justin Sheehy Charlie Shepherd diff --git a/Misc/NEWS b/Misc/NEWS index b8509ce2667c..3eef15a42e0e 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -379,6 +379,9 @@ Windows Tools/Demos ----------- +- Issue #26271: Fix the Freeze tool to properly use flags passed through + configure. Patch by Daniel Shaulov. + - Issue #26489: Add dictionary unpacking support to Tools/parser/unparse.py. Patch by Guo Ci Teo. diff --git a/Tools/freeze/makemakefile.py b/Tools/freeze/makemakefile.py index 32e804c551e7..fa43fafe1e5c 100644 --- a/Tools/freeze/makemakefile.py +++ b/Tools/freeze/makemakefile.py @@ -17,12 +17,12 @@ def makemakefile(outfp, makevars, files, target): base = os.path.basename(file) dest = base[:-2] + '.o' outfp.write("%s: %s\n" % (dest, file)) - outfp.write("\t$(CC) $(CFLAGS) $(CPPFLAGS) -c %s\n" % file) + outfp.write("\t$(CC) $(PY_CFLAGS) $(PY_CPPFLAGS) -c %s\n" % file) files[i] = dest deps.append(dest) outfp.write("\n%s: %s\n" % (target, ' '.join(deps))) - outfp.write("\t$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) %s -o %s $(LDLAST)\n" % + outfp.write("\t$(LINKCC) $(PY_LDFLAGS) $(LINKFORSHARED) %s -o %s $(LDLAST)\n" % (' '.join(files), target)) outfp.write("\nclean:\n\t-rm -f *.o %s\n" % target)