[patch] turn wordsize check from runtime to compile time
attached patch changes the sizeof(size_t) discovery process from a runtime check (which doesnt work when cross-compiling) to a compile time check (which does work when cross-compiling) tested on ppc/linux and blackfin/linux -mike
On May 7, 2007 12:06 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
attached patch changes the sizeof(size_t) discovery process from a runtime check (which doesnt work when cross-compiling) to a compile time check (which does work when cross-compiling)
tested on ppc/linux and blackfin/linux
so what's it gonna take for this ? just realized that this patch was never merged ... it still applies (once you change "$TMPO" to "$TMPEXE" in the patch) to current trunk ... -mike
On Dec 6, 2007 3:28 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
On May 7, 2007 12:06 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
attached patch changes the sizeof(size_t) discovery process from a runtime check (which doesnt work when cross-compiling) to a compile time check (which does work when cross-compiling)
tested on ppc/linux and blackfin/linux
so what's it gonna take for this ? just realized that this patch was never merged ... it still applies (once you change "$TMPO" to "$TMPEXE" in the patch) to current trunk ... -mike
Can you re attach the patch? Thanks Marc
On Dec 6, 2007 3:52 PM, Marc Hoffman <mmhoffm@gmail.com> wrote:
On Dec 6, 2007 3:28 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
On May 7, 2007 12:06 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
attached patch changes the sizeof(size_t) discovery process from a runtime check (which doesnt work when cross-compiling) to a compile time check (which does work when cross-compiling)
tested on ppc/linux and blackfin/linux
so what's it gonna take for this ? just realized that this patch was never merged ... it still applies (once you change "$TMPO" to "$TMPEXE" in the patch) to current trunk ...
Can you re attach the patch?
here is one made against svn rev 25211 -mike
On Dec 6, 2007 10:28 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
On May 7, 2007 12:06 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
attached patch changes the sizeof(size_t) discovery process from a runtime check (which doesnt work when cross-compiling) to a compile time check (which does work when cross-compiling)
tested on ppc/linux and blackfin/linux
so what's it gonna take for this ? just realized that this patch was never merged ... it still applies (once you change "$TMPO" to "$TMPEXE" in the patch) to current trunk ... -mike
I'm not configure maintainer and I'm not even quite good in shell scripts. However, I think there are few things that may be improved. 1. Don't try to compile array[-1], with gcc you never know, it may actually compile it. Better try to use #if #error directives. 2. No need to check for 0 case. What are we going to do if it succeeds? 3. I think that MP_WORDSIZE <bits> , your code returns it as <chars//bytes//>
On Dec 6, 2007 5:04 PM, Ivan Kalvachev <ikalvachev@gmail.com> wrote:
On Dec 6, 2007 10:28 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
On May 7, 2007 12:06 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
attached patch changes the sizeof(size_t) discovery process from a runtime check (which doesnt work when cross-compiling) to a compile time check (which does work when cross-compiling)
tested on ppc/linux and blackfin/linux
so what's it gonna take for this ? just realized that this patch was never merged ... it still applies (once you change "$TMPO" to "$TMPEXE" in the patch) to current trunk ...
I'm not configure maintainer and I'm not even quite good in shell scripts. However, I think there are few things that may be improved. 1. Don't try to compile array[-1], with gcc you never know, it may actually compile it.
i highly doubt it. and if it does, gcc is broken, not the configure check. this test case was distilled from autoconf, so if it's good enough for them, it's good enough for a crazy custom hack of a configure script that mplayer uses.
Better try to use #if #error directives.
that wont work. this is compile, not preprocess.
2. No need to check for 0 case. What are we going to do if it succeeds?
then your compiler is a pos ?
3. I think that MP_WORDSIZE <bits> , your code returns it as <chars//bytes//>
it looks that way ... i'll tweak it and send out a new one. thanks -mike
On Dec 6, 2007 5:54 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
On Dec 6, 2007 5:04 PM, Ivan Kalvachev <ikalvachev@gmail.com> wrote:
3. I think that MP_WORDSIZE <bits> , your code returns it as <chars//bytes//>
it looks that way ... i'll tweak it and send out a new one.
updated patch attached -mike
On Dec 6, 2007 7:48 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
On Dec 6, 2007 5:54 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
On Dec 6, 2007 5:04 PM, Ivan Kalvachev <ikalvachev@gmail.com> wrote:
3. I think that MP_WORDSIZE <bits> , your code returns it as <chars//bytes//>
it looks that way ... i'll tweak it and send out a new one.
updated patch attached
Diego, Can we apply this configuration change? Thanks Marc
On Thu, Dec 06, 2007 at 07:48:37PM -0500, Mike Frysinger wrote:
On Dec 6, 2007 5:54 PM, Mike Frysinger <vapier.adi@gmail.com> wrote:
On Dec 6, 2007 5:04 PM, Ivan Kalvachev <ikalvachev@gmail.com> wrote:
3. I think that MP_WORDSIZE <bits> , your code returns it as <chars//bytes//>
it looks that way ... i'll tweak it and send out a new one.
updated patch attached
Why do you test for so many word sizes? AFAICT only 32 and 64 are relevant. Diego
participants (4)
-
Diego Biurrun -
Ivan Kalvachev -
Marc Hoffman -
Mike Frysinger