Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
-DMODEL_$(MODEL) not passed when building .p.o #6268
Original bug ID: 6268
I am one of the primary maintainers of raspbian, a project to rebuild a hard float version of debian for the raspberry pi and other armv6+vfpv2 devices. Note that while we target armv6 devices we build on armv7 devices.
The source package for ocaml 4.01.0-3 was imported from debian jessie to raspbian jessie and one of our autobuilders built it. However the binaries did not make it to the archive because they set of our armv7 contamination checker.
The first issue I ran into was that "--host arm-linux-gnueabihf" which was passed by the debian packaging when building on armhf results in an armv7 build. Some may argue over whether such behaviour is a bug but it isn't the subject of this bug.
After some testing and configure script reading I deduced that "--host armv6-unknown-linux-gnueabihf" was what was needed to do an armv6 hardfloat build. I modified the packaging, built the package and ran it through the contamination checker and it failed again. Further investigation revealed that -DMODEL_armv6 was being passed for the build of arm.o arm.p.o. I enquired on irc about whether this was deliberate or an oversight and was advised it was probablly an oversight.
So after a little digging in the build system I added the -DMODEL to the rule for building .p.o files from .S files and built again. This time it came out clean so I uploaded to raspbian.
A debdiff of what I uploaded to raspbian can be found at http://debdiffs.raspbian.org/main/o/ocaml/ocaml_4.01.0-3%2brpi1.debdiff
P.S. I am not an ocaml programmer.