Discussion:
[uClinux-dev] out-of-date libgmp / building for M5208
Andrew Cagney
2015-12-07 18:23:31 UTC
Permalink
Hi,

The libgmp bundled with uClinux, by default, doesn't build for the
M5208 - the m68k assembler uses instructions dropped from early
Coldfires.
The hack I'm using locally is to configure with --host=none (I got
this trick second hand from somewhere).

Anyway I noticed that libgmp is, er, a little out-of-date. The latest
version has --disable-assembly which looks to be a cleaner way to
handle the assembler problem.
(How to decide when to configure with that option is an open question,
a Kconfig option).

As anyone looked at updating this; or to turn the question round, is
there anything needed in the existing version that would prevent this?

Andrew
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Greg Ungerer
2015-12-08 12:03:15 UTC
Permalink
Hi Andrew,
Post by Andrew Cagney
The libgmp bundled with uClinux, by default, doesn't build for the
M5208 - the m68k assembler uses instructions dropped from early
Coldfires.
The hack I'm using locally is to configure with --host=none (I got
this trick second hand from somewhere).
Anyway I noticed that libgmp is, er, a little out-of-date. The latest
version has --disable-assembly which looks to be a cleaner way to
handle the assembler problem.
(How to decide when to configure with that option is an open question,
a Kconfig option).
As anyone looked at updating this; or to turn the question round, is
there anything needed in the existing version that would prevent this?
Nothing stopping updating as far as I know.

Can I suggest that if you do decide to update it that you convert
it to automake building. The trend over the last couple of years
is that if we are updating a package then convert it. There
are quite a few examples to follow in the lib directory. Just
look for directories that contain a "makefile" and optionally a
patches directory and not much else.

Regards
Greg

_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Andrew Cagney
2015-12-09 18:03:12 UTC
Permalink
Post by Greg Ungerer
Hi Andrew,
Post by Andrew Cagney
The libgmp bundled with uClinux, by default, doesn't build for the
M5208 - the m68k assembler uses instructions dropped from early
Coldfires.
The hack I'm using locally is to configure with --host=none (I got
this trick second hand from somewhere).
Anyway I noticed that libgmp is, er, a little out-of-date. The latest
version has --disable-assembly which looks to be a cleaner way to
handle the assembler problem.
(How to decide when to configure with that option is an open question,
a Kconfig option).
As anyone looked at updating this; or to turn the question round, is
there anything needed in the existing version that would prevent this?
Nothing stopping updating as far as I know.
Can I suggest that if you do decide to update it that you convert
it to automake building.
Yes, that's the plan. I've noticed that the framework's improved
significantly over the years and I've been able to drop some of my
local hacks.
Post by Greg Ungerer
The trend over the last couple of years
is that if we are updating a package then convert it. There
are quite a few examples to follow in the lib directory. Just
look for directories that contain a "makefile" and optionally a
patches directory and not much else.
Any pointers for how to handle --disable-assembly configure option?
For instance, since libreswan requires libgmp, it would have:
select LIB_LIBGMP
but libreswan doesn't know if --disable-assembly is required, that
would be set by a vendor/platform files?

Andrew
Post by Greg Ungerer
_______________________________________________
uClinux-dev mailing list
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
David McCullough
2015-12-09 22:35:27 UTC
Permalink
Post by Andrew Cagney
Post by Greg Ungerer
Hi Andrew,
Post by Andrew Cagney
The libgmp bundled with uClinux, by default, doesn't build for the
M5208 - the m68k assembler uses instructions dropped from early
Coldfires.
The hack I'm using locally is to configure with --host=none (I got
this trick second hand from somewhere).
Anyway I noticed that libgmp is, er, a little out-of-date. The latest
version has --disable-assembly which looks to be a cleaner way to
handle the assembler problem.
(How to decide when to configure with that option is an open question,
a Kconfig option).
As anyone looked at updating this; or to turn the question round, is
there anything needed in the existing version that would prevent this?
Nothing stopping updating as far as I know.
Can I suggest that if you do decide to update it that you convert
it to automake building.
Yes, that's the plan. I've noticed that the framework's improved
significantly over the years and I've been able to drop some of my
local hacks.
Post by Greg Ungerer
The trend over the last couple of years
is that if we are updating a package then convert it. There
are quite a few examples to follow in the lib directory. Just
look for directories that contain a "makefile" and optionally a
patches directory and not much else.
Any pointers for how to handle --disable-assembly configure option?
select LIB_LIBGMP
but libreswan doesn't know if --disable-assembly is required, that
would be set by a vendor/platform files?
Yep, make that part of the libgmp setup. If you switch to automake you
can add that option to a Kconfig in the libgmp directory, again, there
are quite a few examples in the tree. some have their own Kconfig files:

grep -l automake lib/*/makefile user/*/makefile

ls lib/*/Kconfig user/*/Kconfig

to find them all.

Cheers,
Davidm
--
David McCullough, ***@spottygum.com, Ph: 0410 560 763
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Andrew Cagney
2015-12-11 17:03:06 UTC
Permalink
I came up with the attached. The existing libgmp configuration in
lib/Kconfig would need removing.
Post by David McCullough
Post by Andrew Cagney
Post by Greg Ungerer
Hi Andrew,
Post by Andrew Cagney
The libgmp bundled with uClinux, by default, doesn't build for the
M5208 - the m68k assembler uses instructions dropped from early
Coldfires.
The hack I'm using locally is to configure with --host=none (I got
this trick second hand from somewhere).
Anyway I noticed that libgmp is, er, a little out-of-date. The latest
version has --disable-assembly which looks to be a cleaner way to
handle the assembler problem.
(How to decide when to configure with that option is an open question,
a Kconfig option).
As anyone looked at updating this; or to turn the question round, is
there anything needed in the existing version that would prevent this?
Nothing stopping updating as far as I know.
Can I suggest that if you do decide to update it that you convert
it to automake building.
Yes, that's the plan. I've noticed that the framework's improved
significantly over the years and I've been able to drop some of my
local hacks.
Post by Greg Ungerer
The trend over the last couple of years
is that if we are updating a package then convert it. There
are quite a few examples to follow in the lib directory. Just
look for directories that contain a "makefile" and optionally a
patches directory and not much else.
Any pointers for how to handle --disable-assembly configure option?
select LIB_LIBGMP
but libreswan doesn't know if --disable-assembly is required, that
would be set by a vendor/platform files?
Yep, make that part of the libgmp setup. If you switch to automake you
can add that option to a Kconfig in the libgmp directory, again, there
grep -l automake lib/*/makefile user/*/makefile
ls lib/*/Kconfig user/*/Kconfig
to find them all.
Cheers,
Davidm
--
_______________________________________________
uClinux-dev mailing list
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
http://mailman.uclinux.org/mailman/options/uclinux-dev
Greg Ungerer
2015-12-14 00:43:04 UTC
Permalink
Hi Andrew,
Post by Andrew Cagney
I came up with the attached. The existing libgmp configuration in
lib/Kconfig would need removing.
I would suggest not bothering to make it a menu on its own.
And the config entry for LIB_LIBGMP_DISABLE_ASSEMBLY should
have a "depends on LIB_LIBGMP".

Otherwise it is looking good.

Regards
Greg
Post by Andrew Cagney
Post by David McCullough
Post by Andrew Cagney
Post by Greg Ungerer
Hi Andrew,
Post by Andrew Cagney
The libgmp bundled with uClinux, by default, doesn't build for the
M5208 - the m68k assembler uses instructions dropped from early
Coldfires.
The hack I'm using locally is to configure with --host=none (I got
this trick second hand from somewhere).
Anyway I noticed that libgmp is, er, a little out-of-date. The latest
version has --disable-assembly which looks to be a cleaner way to
handle the assembler problem.
(How to decide when to configure with that option is an open question,
a Kconfig option).
As anyone looked at updating this; or to turn the question round, is
there anything needed in the existing version that would prevent this?
Nothing stopping updating as far as I know.
Can I suggest that if you do decide to update it that you convert
it to automake building.
Yes, that's the plan. I've noticed that the framework's improved
significantly over the years and I've been able to drop some of my
local hacks.
Post by Greg Ungerer
The trend over the last couple of years
is that if we are updating a package then convert it. There
are quite a few examples to follow in the lib directory. Just
look for directories that contain a "makefile" and optionally a
patches directory and not much else.
Any pointers for how to handle --disable-assembly configure option?
select LIB_LIBGMP
but libreswan doesn't know if --disable-assembly is required, that
would be set by a vendor/platform files?
Yep, make that part of the libgmp setup. If you switch to automake you
can add that option to a Kconfig in the libgmp directory, again, there
grep -l automake lib/*/makefile user/*/makefile
ls lib/*/Kconfig user/*/Kconfig
to find them all.
Cheers,
Davidm
--
_______________________________________________
uClinux-dev mailing list
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Andrew Cagney
2015-12-14 02:18:57 UTC
Permalink
Post by Greg Ungerer
Hi Andrew,
Post by Andrew Cagney
I came up with the attached. The existing libgmp configuration in
lib/Kconfig would need removing.
I would suggest not bothering to make it a menu on its own.
And the config entry for LIB_LIBGMP_DISABLE_ASSEMBLY should
have a "depends on LIB_LIBGMP".
I tried that. Consider:

- target board is M5208EVB which isn't supported by libgmp's assembly files

- libreswan requires libgmp so it's Kconfig includes a line to enable
building libgmp

So the developer uses menuconfig, selects "libreswan", and builds.

Unfortunately it fails because the disable-assembly option needs to be
set manually.

Having it as a separate flag and not requiring LIB_LIBGMP made it
possible to save it in the vendor config file regardless of LIB_LIBGMP
status.

idea's welcome.

-
LIB_LIBGMP is some
Post by Greg Ungerer
Otherwise it is looking good.
Regards
Greg
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Greg Ungerer
2015-12-14 04:32:36 UTC
Permalink
Hi Andrew,
Post by Andrew Cagney
Post by Greg Ungerer
Hi Andrew,
Post by Andrew Cagney
I came up with the attached. The existing libgmp configuration in
lib/Kconfig would need removing.
I would suggest not bothering to make it a menu on its own.
And the config entry for LIB_LIBGMP_DISABLE_ASSEMBLY should
have a "depends on LIB_LIBGMP".
- target board is M5208EVB which isn't supported by libgmp's assembly files
- libreswan requires libgmp so it's Kconfig includes a line to enable
building libgmp
So the developer uses menuconfig, selects "libreswan", and builds.
Unfortunately it fails because the disable-assembly option needs to be
set manually.
Having it as a separate flag and not requiring LIB_LIBGMP made it
possible to save it in the vendor config file regardless of LIB_LIBGMP
status.
But what user would set the disable assembler option correctly
when they don't even think they need libgmp? I don't think it
logically follows that it should be an always selectable option.
Post by Andrew Cagney
idea's welcome.
In your example above it is not the M5208EVB that is the selection
criteria. It is probably the fact that a ColdFire architecture CPU
is the target.

Maybe make time setting would work better in this case. Have a look
in the lib/libssl/makefile for an example that has to solve a
similar problem.

Regards
Greg


_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Andrew Cagney
2015-12-14 15:11:26 UTC
Permalink
Post by Greg Ungerer
Hi Andrew,
Post by Andrew Cagney
Post by Greg Ungerer
Hi Andrew,
Post by Andrew Cagney
I came up with the attached. The existing libgmp configuration in
lib/Kconfig would need removing.
I would suggest not bothering to make it a menu on its own.
And the config entry for LIB_LIBGMP_DISABLE_ASSEMBLY should
have a "depends on LIB_LIBGMP".
- target board is M5208EVB which isn't supported by libgmp's assembly files
- libreswan requires libgmp so it's Kconfig includes a line to enable
building libgmp
So the developer uses menuconfig, selects "libreswan", and builds.
Unfortunately it fails because the disable-assembly option needs to be
set manually.
Having it as a separate flag and not requiring LIB_LIBGMP made it
possible to save it in the vendor config file regardless of LIB_LIBGMP
status.
But what user would set the disable assembler option correctly
when they don't even think they need libgmp? I don't think it
logically follows that it should be an always selectable option.
Post by Andrew Cagney
idea's welcome.
In your example above it is not the M5208EVB that is the selection
criteria. It is probably the fact that a ColdFire architecture CPU
is the target.
Maybe make time setting would work better in this case. Have a look
in the lib/libssl/makefile for an example that has to solve a
similar problem.
Yea, that's along the lines of my plan B - put the matic closer to the
problem in lib/libgmp/makefile. Thanks for the pointer.

Andrew
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Greg Ungerer
2015-12-14 01:35:45 UTC
Permalink
Hi Andrew,
Post by Andrew Cagney
I came up with the attached. The existing libgmp configuration in
lib/Kconfig would need removing.
Just a heads up... But some other targets in the tree that
currently have libgmp enabled no longer compile with this
in place.

For example building an ARM target fails at:

...
Executing: /bin/sh -c 'ucfront-gcc' 'arm-linux-gnueabi-20150104-gcc' '-std=gnu99' '-DHAVE_CONFIG_H' '-I.' '-D__GMP_WITHIN_GMP' '-O1' '-pipe' '-fno-common' '-fno-builtin' '-Wall' '-Dlinux' '-D__linux__' '-Dunix' '-DEMBED' '-c' 'tal-reent.c' '-fPIC' '-o' 'tal-reent.o'
Executing: touch tal-reent.lo
make[5]: *** No rule to make target `mpn/add_n.lo', needed by `libgmp.la'. Stop.
make[5]: Leaving directory `/home/gerg/uclinux-dist.foo/lib/libgmp/build/gmp-6.1.0'
make[4]: *** [all-recursive] Error 1

Regards
Greg
Post by Andrew Cagney
Post by David McCullough
Post by Andrew Cagney
Post by Greg Ungerer
Hi Andrew,
Post by Andrew Cagney
The libgmp bundled with uClinux, by default, doesn't build for the
M5208 - the m68k assembler uses instructions dropped from early
Coldfires.
The hack I'm using locally is to configure with --host=none (I got
this trick second hand from somewhere).
Anyway I noticed that libgmp is, er, a little out-of-date. The latest
version has --disable-assembly which looks to be a cleaner way to
handle the assembler problem.
(How to decide when to configure with that option is an open question,
a Kconfig option).
As anyone looked at updating this; or to turn the question round, is
there anything needed in the existing version that would prevent this?
Nothing stopping updating as far as I know.
Can I suggest that if you do decide to update it that you convert
it to automake building.
Yes, that's the plan. I've noticed that the framework's improved
significantly over the years and I've been able to drop some of my
local hacks.
Post by Greg Ungerer
The trend over the last couple of years
is that if we are updating a package then convert it. There
are quite a few examples to follow in the lib directory. Just
look for directories that contain a "makefile" and optionally a
patches directory and not much else.
Any pointers for how to handle --disable-assembly configure option?
select LIB_LIBGMP
but libreswan doesn't know if --disable-assembly is required, that
would be set by a vendor/platform files?
Yep, make that part of the libgmp setup. If you switch to automake you
can add that option to a Kconfig in the libgmp directory, again, there
grep -l automake lib/*/makefile user/*/makefile
ls lib/*/Kconfig user/*/Kconfig
to find them all.
Cheers,
Davidm
--
_______________________________________________
uClinux-dev mailing list
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Andrew Cagney
2015-12-14 16:11:42 UTC
Permalink
Post by Greg Ungerer
Hi Andrew,
Post by Andrew Cagney
I came up with the attached. The existing libgmp configuration in
lib/Kconfig would need removing.
Just a heads up... But some other targets in the tree that
currently have libgmp enabled no longer compile with this
in place.
...
Executing: /bin/sh -c 'ucfront-gcc' 'arm-linux-gnueabi-20150104-gcc' '-std=gnu99' '-DHAVE_CONFIG_H' '-I.' '-D__GMP_WITHIN_GMP' '-O1' '-pipe' '-fno-common' '-fno-builtin' '-Wall' '-Dlinux' '-D__linux__' '-Dunix' '-DEMBED' '-c' 'tal-reent.c' '-fPIC' '-o' 'tal-reent.o'
Executing: touch tal-reent.lo
make[5]: *** No rule to make target `mpn/add_n.lo', needed by `libgmp.la'. Stop.
make[5]: Leaving directory `/home/gerg/uclinux-dist.foo/lib/libgmp/build/gmp-6.1.0'
make[4]: *** [all-recursive] Error 1
What happens if you point the URL at 5.x series, for instance:
https://gmplib.org/download/gmp/gmp-5.1.3.tar.xz

This thread:
http://stackoverflow.com/a/16726435/1357163
lead me to this patch:
https://gmplib.org/repo/gmp-5.1/rev/2347fd4901ad
which I don't seem to be able to find in 6.x's ChangeLog.

(and of course, just my luck that --disable-assembly was only added in 6.x)
Post by Greg Ungerer
Regards
Greg
Post by Andrew Cagney
Post by David McCullough
Post by Andrew Cagney
Post by Greg Ungerer
Hi Andrew,
Post by Andrew Cagney
The libgmp bundled with uClinux, by default, doesn't build for the
M5208 - the m68k assembler uses instructions dropped from early
Coldfires.
The hack I'm using locally is to configure with --host=none (I got
this trick second hand from somewhere).
Anyway I noticed that libgmp is, er, a little out-of-date. The latest
version has --disable-assembly which looks to be a cleaner way to
handle the assembler problem.
(How to decide when to configure with that option is an open question,
a Kconfig option).
As anyone looked at updating this; or to turn the question round, is
there anything needed in the existing version that would prevent this?
Nothing stopping updating as far as I know.
Can I suggest that if you do decide to update it that you convert
it to automake building.
Yes, that's the plan. I've noticed that the framework's improved
significantly over the years and I've been able to drop some of my
local hacks.
Post by Greg Ungerer
The trend over the last couple of years
is that if we are updating a package then convert it. There
are quite a few examples to follow in the lib directory. Just
look for directories that contain a "makefile" and optionally a
patches directory and not much else.
Any pointers for how to handle --disable-assembly configure option?
select LIB_LIBGMP
but libreswan doesn't know if --disable-assembly is required, that
would be set by a vendor/platform files?
Yep, make that part of the libgmp setup. If you switch to automake you
can add that option to a Kconfig in the libgmp directory, again, there
grep -l automake lib/*/makefile user/*/makefile
ls lib/*/Kconfig user/*/Kconfig
to find them all.
Cheers,
Davidm
--
_______________________________________________
uClinux-dev mailing list
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Greg Ungerer
2015-12-15 05:32:20 UTC
Permalink
Hi Andrew,
Post by Andrew Cagney
Post by Greg Ungerer
Post by Andrew Cagney
I came up with the attached. The existing libgmp configuration in
lib/Kconfig would need removing.
Just a heads up... But some other targets in the tree that
currently have libgmp enabled no longer compile with this
in place.
...
Executing: /bin/sh -c 'ucfront-gcc' 'arm-linux-gnueabi-20150104-gcc' '-std=gnu99' '-DHAVE_CONFIG_H' '-I.' '-D__GMP_WITHIN_GMP' '-O1' '-pipe' '-fno-common' '-fno-builtin' '-Wall' '-Dlinux' '-D__linux__' '-Dunix' '-DEMBED' '-c' 'tal-reent.c' '-fPIC' '-o' 'tal-reent.o'
Executing: touch tal-reent.lo
make[5]: *** No rule to make target `mpn/add_n.lo', needed by `libgmp.la'. Stop.
make[5]: Leaving directory `/home/gerg/uclinux-dist.foo/lib/libgmp/build/gmp-6.1.0'
make[4]: *** [all-recursive] Error 1
https://gmplib.org/download/gmp/gmp-5.1.3.tar.xz
Same result. Fails to build with same error.
Post by Andrew Cagney
http://stackoverflow.com/a/16726435/1357163
https://gmplib.org/repo/gmp-5.1/rev/2347fd4901ad
which I don't seem to be able to find in 6.x's ChangeLog.
The problem doesn't appear to be ARM specific. I tried a compile
of an x86_64 target and it failed in a similar way:

make[5]: *** No rule to make target `mpn/invert_limb_table.lo', needed by `libgmp.la'. Stop.

Regards
Greg
Post by Andrew Cagney
(and of course, just my luck that --disable-assembly was only added in 6.x)
Post by Greg Ungerer
Regards
Greg
Post by Andrew Cagney
Post by David McCullough
Post by Andrew Cagney
Post by Greg Ungerer
Hi Andrew,
Post by Andrew Cagney
The libgmp bundled with uClinux, by default, doesn't build for the
M5208 - the m68k assembler uses instructions dropped from early
Coldfires.
The hack I'm using locally is to configure with --host=none (I got
this trick second hand from somewhere).
Anyway I noticed that libgmp is, er, a little out-of-date. The latest
version has --disable-assembly which looks to be a cleaner way to
handle the assembler problem.
(How to decide when to configure with that option is an open question,
a Kconfig option).
As anyone looked at updating this; or to turn the question round, is
there anything needed in the existing version that would prevent this?
Nothing stopping updating as far as I know.
Can I suggest that if you do decide to update it that you convert
it to automake building.
Yes, that's the plan. I've noticed that the framework's improved
significantly over the years and I've been able to drop some of my
local hacks.
Post by Greg Ungerer
The trend over the last couple of years
is that if we are updating a package then convert it. There
are quite a few examples to follow in the lib directory. Just
look for directories that contain a "makefile" and optionally a
patches directory and not much else.
Any pointers for how to handle --disable-assembly configure option?
select LIB_LIBGMP
but libreswan doesn't know if --disable-assembly is required, that
would be set by a vendor/platform files?
Yep, make that part of the libgmp setup. If you switch to automake you
can add that option to a Kconfig in the libgmp directory, again, there
grep -l automake lib/*/makefile user/*/makefile
ls lib/*/Kconfig user/*/Kconfig
to find them all.
Cheers,
Davidm
--
_______________________________________________
uClinux-dev mailing list
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Andrew Cagney
2016-02-13 01:55:04 UTC
Permalink
FYI,

I've attached a simpler Kconfig and makefile. However,
Post by Greg Ungerer
Hi Andrew,
Post by Andrew Cagney
Post by Greg Ungerer
Post by Andrew Cagney
I came up with the attached. The existing libgmp configuration in
lib/Kconfig would need removing.
Just a heads up... But some other targets in the tree that
currently have libgmp enabled no longer compile with this
in place.
...
Executing: /bin/sh -c 'ucfront-gcc' 'arm-linux-gnueabi-20150104-gcc' '-std=gnu99' '-DHAVE_CONFIG_H' '-I.' '-D__GMP_WITHIN_GMP' '-O1' '-pipe' '-fno-common' '-fno-builtin' '-Wall' '-Dlinux' '-D__linux__' '-Dunix' '-DEMBED' '-c' 'tal-reent.c' '-fPIC' '-o' 'tal-reent.o'
Executing: touch tal-reent.lo
make[5]: *** No rule to make target `mpn/add_n.lo', needed by `libgmp.la'. Stop.
make[5]: Leaving directory `/home/gerg/uclinux-dist.foo/lib/libgmp/build/gmp-6.1.0'
make[4]: *** [all-recursive] Error 1
https://gmplib.org/download/gmp/gmp-5.1.3.tar.xz
Same result. Fails to build with same error.
I've had no luck with this. Hmm, perhaps my build works because I'm
using the C file:

gmp-6.1.0/mpn/add_n.c -> ../mpn/generic/add_n.c

but arm would be trying to build the assembler instead.
Post by Greg Ungerer
Post by Andrew Cagney
http://stackoverflow.com/a/16726435/1357163
https://gmplib.org/repo/gmp-5.1/rev/2347fd4901ad
which I don't seem to be able to find in 6.x's ChangeLog.
The problem doesn't appear to be ARM specific. I tried a compile
make[5]: *** No rule to make target `mpn/invert_limb_table.lo', needed by `libgmp.la'. Stop.
Regards
Greg
Post by Andrew Cagney
(and of course, just my luck that --disable-assembly was only added in 6.x)
Greg Ungerer
2016-02-15 01:24:19 UTC
Permalink
Post by Andrew Cagney
FYI,
I've attached a simpler Kconfig and makefile. However,
Post by Greg Ungerer
Hi Andrew,
Post by Andrew Cagney
Post by Greg Ungerer
Post by Andrew Cagney
I came up with the attached. The existing libgmp configuration in
lib/Kconfig would need removing.
Just a heads up... But some other targets in the tree that
currently have libgmp enabled no longer compile with this
in place.
...
Executing: /bin/sh -c 'ucfront-gcc' 'arm-linux-gnueabi-20150104-gcc' '-std=gnu99' '-DHAVE_CONFIG_H' '-I.' '-D__GMP_WITHIN_GMP' '-O1' '-pipe' '-fno-common' '-fno-builtin' '-Wall' '-Dlinux' '-D__linux__' '-Dunix' '-DEMBED' '-c' 'tal-reent.c' '-fPIC' '-o' 'tal-reent.o'
Executing: touch tal-reent.lo
make[5]: *** No rule to make target `mpn/add_n.lo', needed by `libgmp.la'. Stop.
make[5]: Leaving directory `/home/gerg/uclinux-dist.foo/lib/libgmp/build/gmp-6.1.0'
make[4]: *** [all-recursive] Error 1
https://gmplib.org/download/gmp/gmp-5.1.3.tar.xz
Same result. Fails to build with same error.
I've had no luck with this. Hmm, perhaps my build works because I'm
gmp-6.1.0/mpn/add_n.c -> ../mpn/generic/add_n.c
but arm would be trying to build the assembler instead.
So you didn't try to build for any other architecture?

Regards
Greg
Post by Andrew Cagney
Post by Greg Ungerer
Post by Andrew Cagney
http://stackoverflow.com/a/16726435/1357163
https://gmplib.org/repo/gmp-5.1/rev/2347fd4901ad
which I don't seem to be able to find in 6.x's ChangeLog.
The problem doesn't appear to be ARM specific. I tried a compile
make[5]: *** No rule to make target `mpn/invert_limb_table.lo', needed by `libgmp.la'. Stop.
Regards
Greg
Post by Andrew Cagney
(and of course, just my luck that --disable-assembly was only added in 6.x)
_______________________________________________
uClinux-dev mailing list
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
http://mailman.uclinux.org/mailman/options/uclinux-dev
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
Andrew Cagney
2016-03-10 15:04:43 UTC
Permalink
Post by Greg Ungerer
Post by Andrew Cagney
I've had no luck with this. Hmm, perhaps my build works because I'm
gmp-6.1.0/mpn/add_n.c -> ../mpn/generic/add_n.c
but arm would be trying to build the assembler instead.
So you didn't try to build for any other architecture?
Well I did try building arm, but it died for other reasons.

And I did find that gmp built (for i386) using the OpenWRT toolchain.
Post by Greg Ungerer
Regards
Greg
_______________________________________________
uClinux-dev mailing list
uClinux-***@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-***@uclinux.org
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev

Loading...