Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933250AbaJUQ64 (ORCPT ); Tue, 21 Oct 2014 12:58:56 -0400 Received: from mail-ie0-f170.google.com ([209.85.223.170]:48381 "EHLO mail-ie0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932382AbaJUQ6y (ORCPT ); Tue, 21 Oct 2014 12:58:54 -0400 Message-ID: <544690CB.4030307@gmail.com> Date: Tue, 21 Oct 2014 09:58:51 -0700 From: David Daney User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130625 Thunderbird/17.0.7 MIME-Version: 1.0 To: David Miller CC: richardcochran@gmail.com, markos.chandras@imgtec.com, linux-mips@linux-mips.org, corbet@lwn.net, netdev@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Documentation: ptp: Fix build failure on MIPS cross builds References: <1413794538-28465-1-git-send-email-markos.chandras@imgtec.com> <20141021110724.GA16479@netboy> <20141021.123544.9516812519754063.davem@davemloft.net> In-Reply-To: <20141021.123544.9516812519754063.davem@davemloft.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/21/2014 09:35 AM, David Miller wrote: > From: Richard Cochran > Date: Tue, 21 Oct 2014 13:07:25 +0200 > >> On Mon, Oct 20, 2014 at 09:42:18AM +0100, Markos Chandras wrote: >>> diff --git a/Documentation/ptp/Makefile b/Documentation/ptp/Makefile >>> index 293d6c09a11f..397c1cd2eda7 100644 >>> --- a/Documentation/ptp/Makefile >>> +++ b/Documentation/ptp/Makefile >>> @@ -1,5 +1,15 @@ >>> # List of programs to build >>> +ifndef CROSS_COMPILE >>> hostprogs-y := testptp >>> +else >>> +# MIPS system calls are defined based on the -mabi that is passed >>> +# to the toolchain which may or may not be a valid option >>> +# for the host toolchain. So disable testptp if target architecture >>> +# is MIPS but the host isn't. >>> +ifndef CONFIG_MIPS >>> +hostprogs-y := testptp >>> +endif >>> +endif >> >> It seems like a shame to simply give up and not compile this at all. >> Is there no way to correctly cross compile this for MIPS? > > Yeah seriously, we should try to make this work instead of throwing our > hands in the air. > We cross compile things successfully all the time for all the various MIPS ABIs. It is a simple matter of having the Makefile setup for cross compiling. What I don't understand is why we are using hostprogs in this Makefile. Isn't this a program that would run on the target, not the build host? David Daney -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/