From: Rudolf Polzer Date: Sun, 3 Nov 2024 01:36:59 +0000 (-0400) Subject: Explicitly support compile using current fteqcc. X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d78485a4acc0650f084f938c636a564f3273ba56;p=xonotic%2Fxonotic-data.pk3dir.git Explicitly support compile using current fteqcc. To do so, use: make -C data/xonotic-data.pk3dir/qcsrc ../progs.dat QCC=$HOME/Downloads/fteqw/build/fteqcc --- diff --git a/qcsrc/lib/compiler.qh b/qcsrc/lib/compiler.qh index 5ca0ed565..0924a81cc 100644 --- a/qcsrc/lib/compiler.qh +++ b/qcsrc/lib/compiler.qh @@ -1,37 +1,54 @@ #pragma once #ifndef QCC_SUPPORT_ACCUMULATE - #ifdef GMQCC + //#ifdef GMQCC #define QCC_SUPPORT_ACCUMULATE - #endif + //#endif #endif #ifndef QCC_SUPPORT_NIL - #ifdef GMQCC + //#ifdef GMQCC #define QCC_SUPPORT_NIL - #endif + //#endif #endif #ifndef QCC_SUPPORT_ERASEABLE - #ifdef GMQCC + //#ifdef GMQCC #define QCC_SUPPORT_ERASEABLE - #endif + //#endif #endif #ifndef QCC_SUPPORT_ALIAS - #ifdef GMQCC + //#ifdef GMQCC #define QCC_SUPPORT_ALIAS - #endif + //#endif #endif #ifndef QCC_SUPPORT_POW - #ifdef GMQCC - #define QCC_SUPPORT_POW - #endif + //#ifdef GMQCC + #define QCC_SUPPORT_POW + //#endif #endif -#ifdef GMQCC - #define LABEL(id) :id -#else - #define LABEL(id) id: +//#ifdef GMQCC + #define LABEL(id) :id +//#else +// #define LABEL(id) id: +//#endif + +#ifdef FTEQCC + // Note: setting these warnings to "enable" makes them still show, + // but permits them with -Werror. + + // Potentially uninitialised variable + #pragma warning enable F302 + + // Local "..." hides global with same name and type + #pragma warning enable F306 + + // sprintf: %d requires float at arg 4 (got __bfloat) + #pragma warning enable F324 + + // addstat: indicated type ev_integer does not match passed field type .float + #pragma warning enable F333 #endif diff --git a/qcsrc/tools/qcc.sh b/qcsrc/tools/qcc.sh index 4b650862a..7cb292838 100755 --- a/qcsrc/tools/qcc.sh +++ b/qcsrc/tools/qcc.sh @@ -22,7 +22,14 @@ ENABLE_EFFECTINFO="${ENABLE_EFFECTINFO:-0}" ENABLE_DEBUGDRAW="${ENABLE_DEBUGDRAW:-0}" ENABLE_DEBUGTRACE="${ENABLE_DEBUGTRACE:-0}" -QCCIDENT="-DGMQCC" +case "$QCC" in + */fteqcc) + QCCIDENT="-DFTEQCC" + ;; + *) + QCCIDENT="-DGMQCC" + ;; +esac # {{{ QCCDEFS