Skip to content

Commit

Permalink
Fixes to emcc to make autoconf enable shared objs
Browse files Browse the repository at this point in the history
When using emcc as a linker, autoconf disables
shared object support.  This is because it expects
the text returned by the -v and --help options to
match certain things that GNU ld prints.

Specifically it expects the output of emcc -v to include
the word 'GNU' and the output of emcc -v to match the
regexp ': supported targets.* elf'

Modified the messages returned by emcc for these options
to make autoconf happy.
  • Loading branch information
eclecticdave committed Nov 30, 2012
1 parent 98d730f commit 5d48629
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion emcc
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,12 @@ or LLVM assembly files in human-readable form.
emcc is affected by several environment variables. For details, view
the source of emcc (search for 'os.environ').
emcc: supported targets: llvm bitcode, javascript, NOT elf
(autoconf likes to see elf above to enable shared object support)
''' % (this, this, this)
exit(0)
elif len(sys.argv) == 2 and sys.argv[1] == '-v': # -v with no inputs
print 'emcc (Emscripten GCC-like replacement) 2.0'
print 'emcc (Emscripten GCC-like replacement + linker emulating GNU ld ) 2.0'
exit(subprocess.call([shared.CLANG, '-v']))

def is_minus_s_for_emcc(newargs,i):
Expand Down

0 comments on commit 5d48629

Please sign in to comment.