bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Make fnstcw work with emscripten


From: Diomidis Spinellis
Subject: Re: Make fnstcw work with emscripten
Date: Sun, 13 Oct 2019 09:23:26 +0300
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0

Hi Bruno,

On 13-Oct-19 3:21, Bruno Haible wrote:
When glibc is compiled with emscripten toolchain for compiling to asm.js
and WebAssembly [1] (e.g. as part of groff),

You mean gnulib, not glibc? glibc is not built when you compile groff.

Yes, I meant gnulib.

the compilation fails due
to the inclusion of assembly code, as shown in the example below.
[...]
When you run
   $ touch empty.c; emcc -E -dM empty.c |grep '\(i386\|x86_64\)'
does is display such macro definitions?

If yes, your emcc compiler is misconfigured. For me, it does not
define __i386__ or __x86_64__; it defines __asmjs__ instead.

Indeed I verified that emcc on its own defines __asmjs__, not __i386__ or __x86_64__.

If not, it means that some file defines __i386__ or __x86_64__
during the compilation. But application files should not do this.
In this case, your groff.bc (or one of the files that it includesE
directly or indirectly) is buggy.

By running gcc on lib/vasnprintf.c with the same flags as emcc (as shown with emmake make V=1) plus -E -fdirectives-only I found that groff's src/include/config.h defines __i386__.

#ifndef __i386__
#define __i386__ 1
#endif

Removing the definition fixes the problem. So it's a bug of emconfigure or groff's autoconf.

Many thanks,

Diomidis



reply via email to

[Prev in Thread] Current Thread [Next in Thread]