Browse Source

Validate user supplied TARGET (#1941)

the build will now abort with an error message when an undefined build TARGET is named

Fixes #1938
tags/v0.3.6^2
TiborGY Martin Kroeker 6 years ago
parent
commit
d11554c88f
2 changed files with 5 additions and 0 deletions
  1. +1
    -0
      Makefile.system
  2. +4
    -0
      getarch.c

+ 1
- 0
Makefile.system View File

@@ -65,6 +65,7 @@ endif

ifdef TARGET
GETARCH_FLAGS := -DFORCE_$(TARGET)
GETARCH_FLAGS += -DUSER_TARGET
endif

# Force fallbacks for 32bit


+ 4
- 0
getarch.c View File

@@ -1068,6 +1068,10 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#ifndef FORCE

#ifdef USER_TARGET
#error "The TARGET specified on the command line or in Makefile.rule is not supported. Please choose a target from TargetList.txt"
#endif

#if defined(__powerpc__) || defined(__powerpc) || defined(powerpc) || \
defined(__PPC__) || defined(PPC) || defined(_POWER) || defined(__POWERPC__)
#ifndef POWER


Loading…
Cancel
Save