From mboxrd@z Thu Jan 1 00:00:00 1970 From: B.R. Oake Date: Mon, 05 Jan 2015 12:24:13 +0000 Subject: [U-Boot] Cannot compile arm u-boot with hardfloat toolchain In-Reply-To: <54AA6CBB.2040900@redhat.com> References: <20150105012857.GE10826@bill-the-cat> <54AA6B9A.1070204@openmailbox.org> <54AA6CBB.2040900@redhat.com> Message-ID: <54AA826D.9080806@openmailbox.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05/01/15 10:51, Hans de Goede wrote: > Ah, ok, thanks for figuring that out, so this only happens to people > following my sunxi-wip branch, because that commit is not upstream yet. > > So I guess I will need to fix this somehow without using 64 bit math, > any suggestions? EDID_DETAILED_TIMING_PIXEL_CLOCK() always returns a uint32 that is 10,000 times a uint16, so one way of avoiding 64-bit arithmetic would be to cancel out the 10,000 before the division: --- a/drivers/video/videomodes.c 2015-01-05 10:18:58.745985034 +0000 +++ b/drivers/video/videomodes.c 2015-01-05 12:15:27.484150964 +0000 @@ -411,7 +411,8 @@ mode->refresh = EDID_DETAILED_TIMING_PIXEL_CLOCK(*t) / (h_total * v_total); - mode->pixclock = 1000000000000LL / EDID_DETAILED_TIMING_PIXEL_CLOCK(*t); + mode->pixclock = 100000000L / + (EDID_DETAILED_TIMING_PIXEL_CLOCK(*t) / 10000); mode->pixclock_khz = (EDID_DETAILED_TIMING_PIXEL_CLOCK(*t) + 500) / 1000; I still wonder though whether a nicer way would be for the configs to be refactored so that -msoft-float was not set on platforms where it wasn't appropriate. Cheers, B.R.