<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class=""></div><div class=""><br class=""></div><br class=""><div class="">
<div class="">Mark Brethen</div><div class=""><a href="mailto:mark.brethen@gmail.com" class="">mark.brethen@gmail.com</a></div><div class=""><br class=""></div><br class="Apple-interchange-newline">

</div>
<div><br class=""><blockquote type="cite" class=""><div class="">On Aug 5, 2022, at 3:04 PM, Ryan Schmidt <<a href="mailto:ryandesign@macports.org" class="">ryandesign@macports.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Aug 5, 2022, at 14:32, Mark Brethen wrote:<br class=""><blockquote type="cite" class=""><br class="">pre-build {<br class="">    set cflags  "${configure.cflags} [get_canonical_archflags cc]"<br class="">    set ldflags "${configure.ldflags} [get_canonical_archflags ld]"<br class=""><br class="">    # workaround for Rank mismatch between actual argument<br class="">    set ver [regsub -all {[[:alpha:]]+} ${compilers.gcc_default} {}]<br class=""><br class="">    if { ${ver} >= 10 } {<br class="">        set fflags "${configure.fflags} [get_canonical_archflags fc] -fallow-argument-mismatch"<br class="">    } else {<br class="">        set fflags "${configure.fflags} [get_canonical_archflags fc]"<br class="">    }<br class=""><br class="">    set args    "CFLAGS=${cflags} FFLAGS=${fflags} LDFLAGS=${ldflags}"<br class=""><br class="">    build.args-append   ${args}<br class=""><br class="">    # Build serial spooles library<br class="">    ui_info "Building spooles"<br class="">    system -W ${workpath}/spooles.2.2 "${args} ${build.cmd} lib"<br class=""><br class="">    # Extend library with multi-threading (MT) subroutines<br class="">    system -W ${workpath}/spooles.2.2/MT/src "${args} ${build.cmd} makeLib"<br class="">}<br class=""><br class=""><br class="">:info:build Building spooles<br class="">:debug:build system -W /opt/local/var/macports/build/_Users_marbre_ports_cad_CalculiX-ccx/CalculiX-ccx/work/spooles.2.2: CFLAGS=-Os -arch x86_64 FFLAGS=-Os -m64 -fallow-argument-mismatch LDFLAGS=-L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-rpath,/opt/local/lib/libgcc -arch x86_64 /usr/bin/make lib<br class="">:info:build sh: -arch: command not found<br class=""><br class="">It worked when I patched the makefile with the flags, but these should probably be passed at build. What did I miss?<br class=""></blockquote><br class="">Quoting?<br class=""><br class="">set args    "CFLAGS=\"${cflags}\" FFLAGS=\"${fflags}\" LDFLAGS=\"${ldflags}\""<br class=""><br class=""></div></div></blockquote></div><br class=""></body></html>