Skip to content

Commit b56c888

Browse files
committed
wscript: remove 32-bit host environment
It's 2025 now -- there is no need to distribute binaries for 32-bit hosts anymore, and it's come to the point where some machines (like my laptop!) cannot seem to successfully compile a `-m32` binary anymore. And for that matter, modern macOS cannot even *run* 32-bit Intel binaries. Extirpate the '32bit' build environment, and replace all uses with 'local' (and, while we are at it, fix the build for pdc2png). Signed-off-by: Joshua Wise <[email protected]>
1 parent ade935f commit b56c888

File tree

7 files changed

+8
-17
lines changed

7 files changed

+8
-17
lines changed

src/idl/nanopb/wscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ def build(bld):
77
source=bld.path.ant_glob('**/*.proto'),
88
includes=bld.path.abspath(),
99
target='proto_schemas',
10-
use='pblibc nanopb idl_includes')
10+
use=['pblibc', 'nanopb', 'idl_includes'])
1111

1212
# vim:filetype=python

src/libbtutil/wscript

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ def build(bld):
1818
build_libutil('libbtutil-cm0', bld.all_envs['cortex-m0'])
1919

2020
build_libutil('libbtutil', bld.env)
21-
build_libutil('libbtutil-32bit', bld.all_envs['32bit'])
2221

2322

2423
# vim:filetype=python

src/libos/wscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def build(bld):
1515

1616
bld(export_includes=['include'], name='libos_includes')
1717

18-
if bld.env in (bld.all_envs['local'], bld.all_envs['32bit']):
18+
if bld.env in (bld.all_envs['local'], ):
1919
# Skip building sources for local builds, like unit tests.
2020
return
2121

src/libutil/wscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def build(bld):
1818
build_libutil('libutil-cm0', bld.all_envs['cortex-m0'])
1919

2020
build_libutil('libutil', bld.env)
21-
build_libutil('libutil-32bit', bld.all_envs['32bit'])
21+
build_libutil('libutil-local', bld.all_envs['local'])
2222

2323

2424
# vim:filetype=python

tools/pdc2png/wscript

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import sh
33
from waflib import Logs
44

55
def build(bld):
6-
pdc2png_env = bld.all_envs['32bit'].derive()
6+
pdc2png_env = bld.all_envs['local'].derive()
77
output = bld.path.get_bld().parent.parent.make_node('pdc2png')
88

99
sources = ["../../src/fw/applib/vendor/uPNG/upng.c",
@@ -40,6 +40,7 @@ def build(bld):
4040
"../../src/fw",
4141
"../../src/libutil/includes",
4242
"../../src/fw/util/time",
43+
"../../applib-targets/overrides",
4344
"../../third_party/freertos",
4445
"../../third_party/freertos/FreeRTOS-Kernel/FreeRTOS/Source/include",
4546
"../../third_party/freertos/FreeRTOS-Kernel/FreeRTOS/Source/portable/GCC/ARM_CM3"]
@@ -66,7 +67,7 @@ def build(bld):
6667
'DISPLAY_FRAMEBUFFER_BYTES=%d' % (144 * 168),
6768
'PBL_COLOR', 'PBL_RECT', 'PLATFORM_SNOWY=1',
6869
'PBI2PNG_EXE="../../tools/pbi2png.py"'],
69-
use=['libutil-32bit', 'libos_includes'],
70+
use=['libutil-local', 'libos_includes'],
7071
env=pdc2png_env)
7172

7273

tools/qemu_spi_cooker/wscript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ from waflib import Logs
44

55

66
def build(bld):
7-
qemu_spi_cooker_env = bld.all_envs['32bit'].derive()
7+
qemu_spi_cooker_env = bld.all_envs['local'].derive()
88
output = bld.path.get_bld().parent.parent.make_node('qemu_spi_cooker')
99

1010
sources = ["../../src/fw/services/normal/filesystem/flash_translation.c",

wscript

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -579,16 +579,6 @@ def configure(conf):
579579
source = conf.path.get_bld().make_node(filename)
580580
os.symlink(source.path_from(conf.path), filename)
581581

582-
prev_env = conf.env
583-
Logs.pprint('CYAN', 'Configuring 32 bit host environment')
584-
# Copy 'local' to serve as the basis for '32bit':
585-
env_32bit = conf.env.derive().detach()
586-
env_32bit.append_value('CFLAGS', '-m32')
587-
env_32bit.append_value('LINKFLAGS', '-m32')
588-
env_32bit.LINK_CC = 'gcc'
589-
conf.all_envs['32bit'] = env_32bit
590-
conf.set_env(prev_env)
591-
592582
# Note: this will modify the 'local' conf when targeting emscripten:
593583
conf.recurse('applib-targets')
594584

@@ -688,6 +678,7 @@ def build(bld):
688678

689679
if bld.variant == 'pdc2png':
690680
bld.recurse('src/libutil')
681+
bld.recurse('third_party/nanopb')
691682
bld.recurse('tools')
692683
return
693684

0 commit comments

Comments
 (0)