Revert "tcc.h: Extend search path for include, lib and crt"
commite5eedc0cda88bd067ab52d13f84dead19998b127
authorgrischka <grischka>
Sat, 24 Sep 2022 07:19:59 +0000 (24 09:19 +0200)
committergrischka <grischka>
Sat, 24 Sep 2022 08:09:12 +0000 (24 10:09 +0200)
tree6e3fe7b9457c680f3ab55857eb8667cfbf34da39
parente41730f11a993c64e50f4842b8aec3f888c801c1
Revert "tcc.h: Extend search path for include, lib and crt"

This reverts commit 2507c7170443cf4cced4d2cda8ba3c8cc259adb1.

Why crowd up search-paths for the normal native compiler with
all sort of invalid stuff.  Why -UCONFIG_TRIPLET if it isn't
set at all for cross-compilers.  Also, the patch still didn't
do anything useful "out of the box".

Instead I'd suggest to do something more simple and more effective.
See Makefile:
- set search paths for cross-compilers to /usr/<triplet> by default
- Install any built "xxx-tcc" and "xxx-libtcc1.a", even if not listed
  with PROGS_CROSS/LIBTCC1_CROSS
- Support ELF-<target> = ... to set the elf interpreter

Some common gnu-triplets are supported by default
  TRIPLET-i386 ?= i386-linux-gnu
  TRIPLET-x86_64 ?= x86_64-linux-gnu
  TRIPLET-arm ?= arm-linux-gnueabihf
  TRIPLET-arm64 ?= aarch64-linux-gnu
  TRIPLET-riscv64 ?= riscv64-linux-gnu

Other triplets can be given explicitly, for example like this:
  $ make cross-arm-eabi TRIPLET-arm-eabi=arm-linux-gnueabi
  $ sudo make install
Makefile
config-extra.mak.example [deleted file]
tcc.h