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.
This commit is contained in:
Brett Cannon 2016-03-18 10:29:43 -07:00
parent 774006232a
commit e4044bfe63
3 changed files with 6 additions and 2 deletions

View File

@ -1326,6 +1326,7 @@ Mark Shannon
Ha Shao Ha Shao
Richard Shapiro Richard Shapiro
Varun Sharma Varun Sharma
Daniel Shaulov
Vlad Shcherbina Vlad Shcherbina
Justin Sheehy Justin Sheehy
Charlie Shepherd Charlie Shepherd

View File

@ -379,6 +379,9 @@ Windows
Tools/Demos 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. - Issue #26489: Add dictionary unpacking support to Tools/parser/unparse.py.
Patch by Guo Ci Teo. Patch by Guo Ci Teo.

View File

@ -17,12 +17,12 @@ def makemakefile(outfp, makevars, files, target):
base = os.path.basename(file) base = os.path.basename(file)
dest = base[:-2] + '.o' dest = base[:-2] + '.o'
outfp.write("%s: %s\n" % (dest, file)) 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 files[i] = dest
deps.append(dest) deps.append(dest)
outfp.write("\n%s: %s\n" % (target, ' '.join(deps))) 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)) (' '.join(files), target))
outfp.write("\nclean:\n\t-rm -f *.o %s\n" % target) outfp.write("\nclean:\n\t-rm -f *.o %s\n" % target)