Skip to content

Commit 2e528a2

Browse files
committed
Fix for FreeBSD build, use $(CC) to link.
1 parent c643245 commit 2e528a2

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

Tools/configure/conf_sharedlib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def setup_ldshared(v):
103103
v.LDCXXSHARED = "$(CXX) -shared"
104104
elif v.ac_sys_system.startswith("FreeBSD"):
105105
has_elf = pyconf.shell(
106-
f'echo "" | {v.CC} -dM -E - | grep __ELF__',
106+
f'_elf_out=$(echo "" | {v.CC} -dM -E - | grep __ELF__)',
107107
exports=["_elf_out"],
108108
)
109109
if has_elf._elf_out:
@@ -113,7 +113,7 @@ def setup_ldshared(v):
113113
v.LDSHARED = "ld -Bshareable"
114114
elif v.ac_sys_system.startswith("OpenBSD"):
115115
has_elf = pyconf.shell(
116-
f'echo "" | {v.CC} -dM -E - | grep __ELF__',
116+
f'_elf_out=$(echo "" | {v.CC} -dM -E - | grep __ELF__)',
117117
exports=["_elf_out"],
118118
)
119119
if has_elf._elf_out:

configure-new

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6390,7 +6390,7 @@ function u_check_structs( _i_m, ac_cv_header_time_altzone, ac_cv_struct_addri
63906390
_al_30[6] = "struct statx.stx_atomic_write_unit_max_opt"
63916391
for (_i_m = 1; (_i_m <= 6); _i_m = (_i_m + 1)) {
63926392
m = _al_30[_i_m]
6393-
pyconf_check_member(m, "linux/stat.h")
6393+
pyconf_check_member(m, "")
63946394
}
63956395
}
63966396
pyconf_checking("for time.h that defines altzone")
@@ -7145,15 +7145,15 @@ function u_setup_ldshared( _tmp_split, dt, dt_major, dt_minor, dt_parts, has_
71457145
V["LDSHARED"] = "$(CC) -shared"
71467146
V["LDCXXSHARED"] = "$(CXX) -shared"
71477147
} else if (_str_startswith(V["ac_sys_system"], "FreeBSD")) {
7148-
has_elf__elf_out = pyconf_shell_export("echo \"\" | " V["CC"] " -dM -E - | grep __ELF__", "_elf_out")
7148+
has_elf__elf_out = pyconf_shell_export("_elf_out=$(echo \"\" | " V["CC"] " -dM -E - | grep __ELF__)", "_elf_out")
71497149
if (((has_elf__elf_out != "") && (has_elf__elf_out != "no"))) {
71507150
V["LDSHARED"] = "$(CC) -shared"
71517151
V["LDCXXSHARED"] = "$(CXX) -shared"
71527152
} else {
71537153
V["LDSHARED"] = "ld -Bshareable"
71547154
}
71557155
} else if (_str_startswith(V["ac_sys_system"], "OpenBSD")) {
7156-
has_elf__elf_out = pyconf_shell_export("echo \"\" | " V["CC"] " -dM -E - | grep __ELF__", "_elf_out")
7156+
has_elf__elf_out = pyconf_shell_export("_elf_out=$(echo \"\" | " V["CC"] " -dM -E - | grep __ELF__)", "_elf_out")
71577157
if (((has_elf__elf_out != "") && (has_elf__elf_out != "no"))) {
71587158
V["LDSHARED"] = "$(CC) -shared $(CCSHARED)"
71597159
V["LDCXXSHARED"] = "$(CXX) -shared $(CCSHARED)"

0 commit comments

Comments
 (0)