mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Updated freeze.py to the new Makefile symbol layout.
Fixed a few compiler warnings. freeze.py now produces binaries which can import shared modules (unlike before).
This commit is contained in:
parent
47834463d0
commit
64b4f2770e
4 changed files with 4 additions and 6 deletions
|
@ -464,7 +464,7 @@ def main():
|
|||
|
||||
somevars['CFLAGS'] = string.join(cflags) # override
|
||||
somevars['CPPFLAGS'] = string.join(cppflags) # override
|
||||
files = ['$(OPT)', '$(LDFLAGS)', base_config_c, base_frozen_c] + \
|
||||
files = [base_config_c, base_frozen_c] + \
|
||||
files + supp_sources + addfiles + libs + \
|
||||
['$(MODLIBS)', '$(LIBS)', '$(SYSLIBS)']
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ def makeconfig(infp, outfp, modules, with_ifdef=0):
|
|||
continue
|
||||
if with_ifdef:
|
||||
outfp.write("#ifndef init%s\n"%mod)
|
||||
outfp.write('extern void init%s();\n' % mod)
|
||||
outfp.write('extern void init%s(void);\n' % mod)
|
||||
if with_ifdef:
|
||||
outfp.write("#endif\n")
|
||||
elif m2 and m2.search(line):
|
||||
|
|
|
@ -18,9 +18,7 @@ trailer = """\
|
|||
# if __debug__ == 0 (i.e. -O option given), set Py_OptimizeFlag in frozen app.
|
||||
default_entry_point = """
|
||||
int
|
||||
main(argc, argv)
|
||||
int argc;
|
||||
char **argv;
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
extern int Py_FrozenMain(int, char **);
|
||||
""" + ((not __debug__ and """
|
||||
|
|
|
@ -24,7 +24,7 @@ def makemakefile(outfp, makevars, files, target):
|
|||
deps.append(dest)
|
||||
|
||||
outfp.write("\n%s: %s\n" % (target, string.join(deps)))
|
||||
outfp.write("\t$(CC) %s -o %s $(LDLAST)\n" %
|
||||
outfp.write("\t$(LINKCC) $(LDFLAGS) $(LINKFORSHARED) %s -o %s $(LDLAST)\n" %
|
||||
(string.join(files), target))
|
||||
|
||||
outfp.write("\nclean:\n\t-rm -f *.o %s\n" % target)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue