summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/arbits/slbt_archive_mapfile.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/arbits/slbt_archive_mapfile.c b/src/arbits/slbt_archive_mapfile.c
index 5bfa0f7..c448c8c 100644
--- a/src/arbits/slbt_archive_mapfile.c
+++ b/src/arbits/slbt_archive_mapfile.c
@@ -45,14 +45,11 @@ static int slbt_ar_output_mapfile_impl(
fsort = !(dctx->cctx->fmtflags & SLBT_OUTPUT_ARCHIVE_NOSORT);
- fmach = !strcmp(dctx->cctx->host.flavor,"darwin");
- fmach = fmach || (mctx->ofmtattr & AR_OBJECT_ATTR_MACHO);
-
- fcoff = !strcmp(dctx->cctx->host.flavor,"midipix");
- fcoff = fcoff || !strcmp(dctx->cctx->host.flavor,"cygwin");
- fcoff = fcoff || !strcmp(dctx->cctx->host.flavor,"mingw");
- fcoff = fcoff || !strcmp(dctx->cctx->host.flavor,"msys2");
- fcoff = fcoff || (mctx->ofmtattr & AR_OBJECT_ATTR_COFF);
+ fmach = slbt_host_objfmt_is_macho(dctx);
+ fmach |= (mctx->ofmtattr & AR_OBJECT_ATTR_MACHO);
+
+ fcoff = slbt_host_objfmt_is_coff(dctx);
+ fcoff |= (mctx->ofmtattr & AR_OBJECT_ATTR_COFF);
if (fcoff) {
if (slbt_dprintf(fdout,"EXPORTS\n") < 0)