diff options
author | Rob Austein <sra@hactrn.net> | 2011-01-14 02:37:14 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2011-01-14 02:37:14 +0000 |
commit | 70095b82dd62f9187f4f90b047f3535a2951a03f (patch) | |
tree | f049d796a01de540242e5dde5ac143a98ead990d /pow | |
parent | 91bb960e169cfad6e6ceb44f73e807e143d3b1e9 (diff) |
Turns out that all the mucking about with "ld -r" and "objcopy" wasn't
necessary, building OpenSSL with -fPIC and linking against static
libraries was enough. So we probably could go back to using
distutils, but for now, we can get rid of the extraneous steps.
svn path=/pow/Makefile.in; revision=3608
Diffstat (limited to 'pow')
-rw-r--r-- | pow/Makefile.in | 3 | ||||
-rw-r--r-- | pow/build.py | 29 |
2 files changed, 3 insertions, 29 deletions
diff --git a/pow/Makefile.in b/pow/Makefile.in index 3b35f201..6cf29b76 100644 --- a/pow/Makefile.in +++ b/pow/Makefile.in @@ -4,7 +4,6 @@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ PYTHON = @PYTHON@ -OBJCOPY = @OBJCOPY@ abs_top_srcdir = @abs_top_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -12,7 +11,7 @@ abs_top_builddir = @abs_top_builddir@ all: POW/_POW.so POW/_POW.so: POW.c - AC_CFLAGS='${CFLAGS}' AC_LDFLAGS='${LDFLAGS}' AC_LIBS='${LIBS}' AC_OBJCOPY='${OBJCOPY}' ${PYTHON} build.py + AC_CFLAGS='${CFLAGS}' AC_LDFLAGS='${LDFLAGS}' AC_LIBS='${LIBS}' ${PYTHON} build.py rm -f *.o clean: diff --git a/pow/build.py b/pow/build.py index 25b5533a..87f99db9 100644 --- a/pow/build.py +++ b/pow/build.py @@ -30,14 +30,6 @@ import os, subprocess, sys from distutils.sysconfig import (get_config_var as getvar, get_python_inc as getinc) -static_libraries = [] -other_libraries = [] -for lib in os.environ["AC_LIBS"].split(): - if lib.startswith("-"): - other_libraries.append(lib) - else: - static_libraries.append(lib) - cmd = getvar("CC").split() cmd.extend(("-c", "-o", "POW.o", "POW.c")) cmd.extend(os.environ["AC_CFLAGS"].split()) @@ -50,29 +42,12 @@ r = subprocess.call(cmd) if r: sys.exit(r) -if static_libraries: - cmd = ["ld", "-r", "-o", "_POW.o", "POW.o"] + static_libraries - print " ".join(cmd) - r = subprocess.call(cmd) - if r: - sys.exit(r) -else: - os.link("POW.o", "_POW.o") - cmd = getvar("LDSHARED").split() -cmd.extend(("-o", "../rpkid/rpki/POW/_POW.so", "_POW.o")) +cmd.extend(("-o", "../rpkid/rpki/POW/_POW.so", "POW.o")) cmd.extend(os.environ["AC_LDFLAGS"].split()) cmd.extend(getvar("LDFLAGS").split()) -cmd.extend(other_libraries) +cmd.extend(os.environ["AC_LIBS"].split()) print " ".join(cmd) r = subprocess.call(cmd) if r: sys.exit(r) - -objcopy = os.getenv("AC_OBJCOPY") -if objcopy: - cmd = [objcopy, "-G", "init_POW", "-x", "../rpkid/rpki/POW/_POW.so"] - print " ".join(cmd) - r = subprocess.call(cmd) - if r: - sys.exit(r) |