Salvador, I sent you this info in an email about 2 1/2 months ago, on Oct 7, 2022. I don't want to forget about it, so I will create an issue here. Here is what I said in the email. As a reminder, the topic is performing a build of a 32-bit binary on Linux 64-bit.
I worked on this issue some more. Thankfully, you just reversed my changes to common.imk, so all the other changes are still in there. Here are 3 separate options that enabled me to build an example after I built the 32-bit version of TVision under 64-bit Linux:
(1) Update common.imk to include RHIDE_LDFLAGS in RHIDE_COMPILE_LINK:
RHIDE_COMPILE_LINK=$(RHIDE_LD) $(RHIDE_LIBDIRS) $(LDFLAGS) $(RHIDE_LDFLAGS) $(C_EXTRA_FLAGS) -o $(OUTFILE) $(OBJFILES) $(LIBRARIES) $(RHIDE_LIBS)
make -f tvedit.mkf
(2) make -f tvedit.mkf LDFLAGS=-m32
(3) LDFLAGS=-m32 make -f tvedit.mkf
Of these options, I like (1) the best, because that makes things easiest for the developer (not the maintainer). Using this option addresses your concern about leaving LDFLAGS available for the developer to use.
As for your concern about RHIDE_LDFLAGS being used for dynamic linking, here's my thought about that. These build scripts are a mess. There's RHIDE_LIBS, RHIDE_OS_LIBS, CFLAGS, RHIDE_OS_CFLAGS, etc. To me, it looks like maintainers at different times weren't quite sure what each of these did, so they just added another one. During an actual build, there is only one final set of C flags, C++ flags and linker flags. So, I don't think we should keep introducing additional sets. Instead, let's use RHIDE_LDFLAGS so LDFLAGS remains available to the developer. For any particular build, the config process should determine the correct set of libs and headers required. If that particular build requires both the inclusion of the -m32 flag as well as a dynamic library, then we should just concatenate them together into RHIDE_LDFLAGS.
I respect that you've been maintaining TVision for a very long time, so defer to your judgment. Let me know how you'd like to proceed. Thanks.