EmScripten error on M1 Mac and older Intel

Hi Folks -
This issue has been discussed previously but I am opening a new post for this topic. Just trying to surface this up again and looking for some directions.

Trying to build OF example for web. Running into issues and it seems this post talks about same issue and has been solved previously.

Started with M1 mac trying to build an example for web using emscripten. The issue I ran into was around installing sdk-1.40.0-64bit.

Got http 404 errors around wasm binary for ARM64 (wasm-binaries-arm64.tbz2)
It seems the sdk is broken for M1 macs for the specific versions (sdk-1.40.0-64bit or sdk-2.0.6-64bit of sdk).
From the post it seems folks were able to get this working but I am unable to get past installing emsdk (neither 1.40.0 or 2.0.6) on the M1 mac.

Second approach that I tried was on an older mac (Intel based). The Xcode version(10.10) on this box is bit older but I thought I will give this a try.
Was able to successfully install sdk-1.40.0-64bit.
And now tried building an example for of_11.0 and Xcode 10.1 and here I get linker error at the end.

wasm-ld: error: unknown argument: --as-needed
make[1]: *** [bin/graphicsExample.html] Error 1
make: *** [Release] Error 2
emmake: error: 'make' failed (returned 2)

I also tried patching config.emscripten.default.mk as per Theo’s PR from here: https://github.com/openframeworks/openFrameworks/pull/6665/commits/311fc18497640835ebfd6b4360c04765c83805f6

Cleaned the previous build and re-ran. Same error at linker stage.
My older mac is High Sierra (10.13.6)
Xcode version - 10.1 (10B61)
Emsdk version tried - sdk-1.40.0-64bit and 2.0.6
OF version - 0.11.0

Ideally would like to get this resolved on the newer machine but seems there is more progress on the older mac.