Signed-off-by: Martin Storsjö <mar...@martin.st> --- Updated with the new parameters. --- mingw-w64-crt/Makefile.am | 10 +++++++++ mingw-w64-crt/def-include/func.def.in | 42 +++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 mingw-w64-crt/def-include/func.def.in
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am index 990e883..4e3dfc9 100644 --- a/mingw-w64-crt/Makefile.am +++ b/mingw-w64-crt/Makefile.am @@ -1244,6 +1244,15 @@ endif %.def: %.def.in $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P -I$(top_srcdir)/def-include > $@ +lib32/%.def: lib-common/%.def.in + $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P -I$(top_srcdir)/def-include -DDEF_I386 > $@ + +lib64/%.def: lib-common/%.def.in + $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P -I$(top_srcdir)/def-include -DDEF_X64 > $@ + +libarm32/%.def: lib-common/%.def.in + $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P -I$(top_srcdir)/def-include -DDEF_ARM32 > $@ + # Don't compile these, but install as is: # libsrcdir=$(includedir) @@ -1277,6 +1286,7 @@ EXTRA_DIST += revstamp.h \ $(top_srcdir)/lib32/*.mri \ $(top_srcdir)/lib64/*.mri \ $(top_srcdir)/libarm32/*.mri \ + $(top_srcdir)/lib-common/*.def.in \ $(top_srcdir)/lib32/*.def.in \ $(top_srcdir)/lib64/*.def.in \ $(top_srcdir)/libarm32/*.def.in \ diff --git a/mingw-w64-crt/def-include/func.def.in b/mingw-w64-crt/def-include/func.def.in new file mode 100644 index 0000000..382cfd3 --- /dev/null +++ b/mingw-w64-crt/def-include/func.def.in @@ -0,0 +1,42 @@ +// F64 - function available on all 64 bit architectures +// F_X86_ANY - function available on i386 and x86_64 +// F_I386 - function available only on i386 +// F_X64 - function available only on x86_64 +// F_ARM32 - function available only on arm32 +// F_ARM_ANY - function available on 32 and 64 bit arm +// F_NON_I386 - function available on everything but i386 +#if defined(DEF_X64) +#define F64(x) x +#define F_X64(x) x +#define F_X86_ANY(x) x +#define F_NON_I386(x) x +#elif defined(DEF_I386) +#define F_I386(x) x +#define F_X86_ANY(x) x +#elif defined(DEF_ARM32) +#define F_ARM32(x) x +#define F_ARM_ANY(x) x +#define F_NON_I386(x) x +#endif + +#ifndef F64 +#define F64(x) +#endif +#ifndef F_X86_ANY +#define F_X86_ANY(x) +#endif +#ifndef F_I386 +#define F_I386(x) +#endif +#ifndef F_X64 +#define F_X64(x) +#endif +#ifndef F_ARM_ANY +#define F_ARM_ANY(x) +#endif +#ifndef F_ARM32 +#define F_ARM32(x) +#endif +#ifndef F_NON_I386 +#define F_NON_I386(x) +#endif -- 2.7.4 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public