]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Explicitly support compile using current fteqcc.
authorRudolf Polzer <divVerent@gmail.com>
Sun, 3 Nov 2024 01:36:59 +0000 (21:36 -0400)
committerRudolf Polzer <divVerent@gmail.com>
Sun, 3 Nov 2024 01:36:59 +0000 (21:36 -0400)
To do so, use:

make -C data/xonotic-data.pk3dir/qcsrc ../progs.dat QCC=$HOME/Downloads/fteqw/build/fteqcc

qcsrc/lib/compiler.qh
qcsrc/tools/qcc.sh

index 5ca0ed56525ee33886c46a0a7c27ecfd7763068b..0924a81cc7776f61c23750b6f4dbf634d4ddd4fe 100644 (file)
@@ -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
index 4b650862ab9029ccdc6d04904f2438b1496cf095..7cb29283898a6f4224628c70dd7bf530057e3c48 100755 (executable)
@@ -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