[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20070310093712.GC22182@infradead.org>
Date: Sat, 10 Mar 2007 09:37:12 +0000
From: Christoph Hellwig <hch@...radead.org>
To: Sam Ravnborg <sam@...nborg.org>
Cc: Jan Engelhardt <jengelh@...ux01.gwdg.de>,
Paulo Marques <pmarques@...popie.com>,
dmitry.torokhov@...il.com, Christoph Hellwig <hch@...radead.org>,
Deepak Saxena <dsaxena@...xity.net>,
Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Fix building kernel under Solaris 11_snv
On Fri, Mar 09, 2007 at 11:23:32PM +0100, Sam Ravnborg wrote:
> > >> ===================================================================
> > >> --- linux-2.6.21-rc3.orig/scripts/kallsyms.c 2007-03-07 05:41:20.000000000 +0100
> > >> +++ linux-2.6.21-rc3/scripts/kallsyms.c 2007-03-07 23:46:46.249005000 +0100
> > >> @@ -378,6 +378,40 @@
> > >> table_cnt = pos;
> > >> }
> > >>
> > >> +#ifdef __sun__
> > >> +/* Return the first occurrence of NEEDLE in HAYSTACK. */
> > >> +void *
> > >> +memmem (haystack, haystack_len, needle, needle_len)
> > >> + const void *haystack;
> > >> + return (void *) begin;
> > >> +
> > >> + return NULL;
> > >> +}
> > >> +#endif
> > >> +
> > >> /* replace a given token in all the valid symbols. Use the sampled symbols
> > >> * to update the counts */
> > >> static void compress_symbols(unsigned char *str, int idx)
> >
> > This one, I am just waiting for someone to object to the extra #if-#endif.
> I was planning to ask Paulo if strstr could not be used - Paulo?
Yeah. And if we can't use something else all the missing functions
should be in a compat-solaris.c files, similarly to how sparse handles
missing functions on various systems instead of polluting implementation
files with ifdefs and duplicates of library code.
> > >> -HOST_EXTRACFLAGS += -DLOCALE
> > >> +HOST_EXTRACFLAGS += -DLOCALE -std=c99 -D__EXTENSIONS__
> > >>
> > >> PHONY += $(obj)/dochecklxdialog
> > >> $(obj)/dochecklxdialog:
> >
> > The error message for this one was: <stdbool.h> only valid in C99 mode.
> > Linux GCC 4.1.2 does not print that, Solaris GCC 3.4.3 does. I do not
> > know offhand who is right.
> The -std= looks safe.
It's not though. It's a gccisms, and I'm not sure we want to mandate
gcc for the host copiler, given that the only way you'd build a working
kernel on a foreign system would be a cross compilation anyway.
> > >> #define M_EVENT (KEY_MAX+1)
> > >> +
> > >> +#ifndef KEY_RESIZE
> > >> +# define KEY_RESIZE 0632
> > >> +#endif
> >
> > Solaris only has curses, not ncurses. Consider this a supreme hack.
> > In fact, menuconfig has some weird display errors still.
> This hack looks OK to me.
Except that solaris curses doesn't actually understand this random
value for KEY_RESIZE. Either we mandate that ncurses is installed on
the host for menuconfig to work (and ncurses at least used to work
on most unix variants), or some needs to do a proper curses port.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists