summaryrefslogtreecommitdiffhomepage
path: root/sofort
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2024-02-22 04:39:46 +0000
committermidipix <writeonce@midipix.org>2024-02-22 04:52:47 +0000
commit8def16a7ab769063d0c84c90c3132e139ba9c4c4 (patch)
tree7f9a2bbbbdf2ad2f88eaec0f75018b855a7d9544 /sofort
parent0532e8f23a6c496b95c17d4568d160ddd1a56594 (diff)
downloadntux-8def16a7ab769063d0c84c90c3132e139ba9c4c4.tar.bz2
ntux-8def16a7ab769063d0c84c90c3132e139ba9c4c4.tar.xz
build system: ccenv.sh: legacy PE targets: define __PE__ and friends as needed.
Diffstat (limited to 'sofort')
-rw-r--r--sofort/ccenv/ccenv.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/sofort/ccenv/ccenv.sh b/sofort/ccenv/ccenv.sh
index 0f7f486..30e28fd 100644
--- a/sofort/ccenv/ccenv.sh
+++ b/sofort/ccenv/ccenv.sh
@@ -1412,6 +1412,20 @@ ccenv_set_os_pe_switches()
;;
esac
fi
+
+ if [ "$ccenv_cc_binfmt" = 'PE' ]; then
+ if ! cfgtest_macro_definition '__PE__'; then
+ ccenv_cflags_os="${ccenv_cflags_os} -D__PE__"
+ fi
+
+ if ! cfgtest_macro_definition '__dllexport'; then
+ ccenv_cflags_os="${ccenv_cflags_os} -D__dllexport=__attribute__\(\(__dllexport__\)\)"
+ fi
+
+ if ! cfgtest_macro_definition '__dllimport'; then
+ ccenv_cflags_os="${ccenv_cflags_os} -D__dllimport=__attribute__\(\(__dllimport__\)\)"
+ fi
+ fi
}
ccenv_output_defs()