Check BinUtils and GCC version. Modified: trunk/reactos/tools/Makefile Added: trunk/reactos/tools/tools-check.c Added: trunk/reactos/tools/tools-check.mak _____
Modified: trunk/reactos/tools/Makefile --- trunk/reactos/tools/Makefile 2005-03-11 14:07:48 UTC (rev 13931) +++ trunk/reactos/tools/Makefile 2005-03-11 17:33:12 UTC (rev 13932) @@ -18,12 +18,15 @@
LIBS = lib_unicode lib_wpp
-CLEAN_FILES = $(TOOLS) +CLEAN_FILES = $(TOOLS) tools-check.tmp tools-check.h
-all: $(TOOLS) $(LIBS) zlib_target wmc_target cabman_target cdmake_target mkhive_target rgenstat_target \ +all: $(TOOLS) tools_check $(LIBS) zlib_target wmc_target cabman_target cdmake_target mkhive_target rgenstat_target \ wine2ros_target pipetools_target winebuild_target bin2res_target wrc_target widl_target \ buildno_target
+tools_check: + $(MAKE) -f tools-check.mak + regtests$(EXE_POSTFIX): regtests.c @$(HOST_CC) $(CFLAGS) -o regtests$(EXE_POSTFIX) regtests.c
_____
Added: trunk/reactos/tools/tools-check.c --- trunk/reactos/tools/tools-check.c 2005-03-11 14:07:48 UTC (rev 13931) +++ trunk/reactos/tools/tools-check.c 2005-03-11 17:33:12 UTC (rev 13932) @@ -0,0 +1,32 @@
+#include "tools-check.h" + +/* + * - Binutils older than 2003/10/01 have broken windres which can't handle + * icons with alpha channel. + * - Binutils between 2004/09/02 and 2004/10/08 have broken handling of + * forward exports in dlltool. + */ + +#if (BINUTILS_VERSION_DATE >= 20040902 && BINUTILS_VERSION_DATE <= 20041008) || \ + (BINUTILS_VERSION_DATE < 20031001) +#error Due to technical reasons your binutils version can't be used to \ + build ReactOS. Please consider upgrading to newer version. See \ + www.mingw.org for details.) +#endif + +/* + * GCC 3.3.1 is lowest allowed version. Older versions have various problems + * with C++ code. + */ + +#if (__GNUC__ == 3 && __GNUC_MINOR__ < 3) || \ + (__GNUC__ < 3) +#error Due to technical reasons your GCC version can't be used to \ + build ReactOS. Please consider upgrading to newer version. See \ + www.mingw.org for details.) +#endif + +/* + * FIXME: GCC 3.4.1 has broken headers which cause Explorer to not build. + * We should warn in this case...maybe add check for the broken headers? + */ _____
Added: trunk/reactos/tools/tools-check.mak --- trunk/reactos/tools/tools-check.mak 2005-03-11 14:07:48 UTC (rev 13931) +++ trunk/reactos/tools/tools-check.mak 2005-03-11 17:33:12 UTC (rev 13932) @@ -0,0 +1,18 @@
+PATH_TO_TOP = .. +include $(PATH_TO_TOP)/rules.mak + +# +# Get the binutils version +# +# The "ld -v" output can be in either of these two formats: +# "GNU ld version 050113 20050113" (nightly build) +# "GNU ld version 2.15.94 20050118" (official release) +# + +BINUTILS_VERSION_DATE=$(word 5,$(shell $(PREFIX)ld -v)) + +all: + @echo #define BINUTILS_VERSION_DATE $(BINUTILS_VERSION_DATE) > tools-check.h + $(HOST_CC) -c tools-check.c -o tools-check.temp + $(RM) tools-check.temp + $(RM) tools-check.h