Skip to content

Commit

Permalink
Compiling with -O3 flag, linker missing forkpty
Browse files Browse the repository at this point in the history
Added -O3 to the compilation flags in superconfigure, and the linker was
complaining that forkpty was not available in posixmodule, so just
blocked that part out with an undef. Also removed an unused define in
the headers stubs.
  • Loading branch information
ahgamut committed Apr 9, 2021
1 parent 5a916a2 commit 383051a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -3922,6 +3922,7 @@ posix_fork(PyObject *self, PyObject *noargs)
#define DEV_PTY_FILE "/dev/ptmx"
#endif

#undef HAVE_FORKPTY
#if defined(HAVE_OPENPTY) || defined(HAVE_FORKPTY) || defined(HAVE_DEV_PTMX)
#ifdef HAVE_PTY_H
#include <pty.h>
Expand Down
1 change: 0 additions & 1 deletion header_stubs/float.h
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
#define FLT_ROUNDS -1
2 changes: 1 addition & 1 deletion superconfigure
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ LD_LIBRARY_PATH="" ./configure \
CCSHARED="" \
LINKFORSHARED="" \
PKG_CONFIG="" \
CFLAGS="-Wall -Wno-strict-prototypes -Wno-unused-value \
CFLAGS="-O3 -Wall -Wno-strict-prototypes -Wno-unused-value \
-std=c99 -static \
-fno-pie -fno-omit-frame-pointer \
-mno-red-zone -pg \
Expand Down

0 comments on commit 383051a

Please sign in to comment.