Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
remove stdc++ from everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
dimpase committed Jun 15, 2020
1 parent 56705f8 commit 07010d4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/sage/misc/cython.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
cblas_include_dirs = list(cblas_pc['include_dirs'])

standard_libs = [
'mpfr', 'gmp', 'gmpxx', 'stdc++', 'pari', 'm',
'mpfr', 'gmp', 'gmpxx', 'pari', 'm',
'ec', 'gsl',
] + cblas_libs + [
'ntl']
Expand Down
6 changes: 1 addition & 5 deletions src/sage_setup/command/sage_build_cython.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,6 @@ def create_extension(self, template, kwds):
- Add dependencies on header files for certain libraries
- Ensure that C++ extensions link with -lstdc++
- Sort the libraries according to the library order
- Add some default compile/link args and directories
Expand All @@ -286,10 +284,8 @@ def create_extension(self, template, kwds):
lang = kwds.get('language', 'c')
cplusplus = (lang == "c++")

# Libraries: add stdc++ if needed and sort them
# Libraries: sort them
libs = kwds.get('libraries', [])
if cplusplus:
libs = libs + ['stdc++']
kwds['libraries'] = sorted(set(libs),
key=lambda lib: library_order.get(lib, 0))

Expand Down
5 changes: 1 addition & 4 deletions src/sage_setup/library_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@
# manually reorder the libraries according to this list. The order is
# important in particular for Cygwin. Any libraries which are not
# listed here will be added at the end of the list (without changing
# their relative order). There is one exception: stdc++ is always put
# at the very end of the list.
# their relative order).
from sage.env import cython_aliases
aliases = cython_aliases()

Expand Down Expand Up @@ -101,5 +100,3 @@
for i in range(n):
lib = library_order_list[i]
library_order[lib] = i-n

library_order["stdc++"] = 1000

0 comments on commit 07010d4

Please sign in to comment.