Summary: | coreutils uname fix for hppa, ppc and alpha | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Guy Martin (RETIRED) <gmsoft> |
Component: | [OLD] Core system | Assignee: | Gentoo's Team for Core System packages <base-system> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alpha, gentoo |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
Correct ppc behaviour of uname and add hppa code.
Fix uname for hppa, ppc and alpha |
Description
Guy Martin (RETIRED)
2003-12-20 10:28:52 UTC
Created attachment 22486 [details, diff]
Correct ppc behaviour of uname and add hppa code.
I should also add that looking at the code reveal that the 003_all_coreutils-gentoo-uname.patch might be broken for others arch. In particular, alpha boxes have a broken uname -i which return nothing. This had to be fixed for mips once. The patch instructs uname to grab data from /proc/cpuinfo, and for mips, it was grabbing the "processor" field, which also returned 0. Rather than apply this patch after the first, might be better to edit the existing patch (which was done for mips. Any alpha people got info on what uname -i should be returning? #if defined(__mips__) "cpu model", "system type" #endif That's the code for mips. I checked with tuxus and it seemed to return the right output. Kumba, can you check this again plz ? That is correct for mips. It used to be "processor, system type" for mips, and it had to be changed to cpu model instead. Created attachment 22717 [details, diff]
Fix uname for hppa, ppc and alpha
I've check with alpha and sparc ppl and only alpha needed a fix. sparc is
correct and others arch should be too.
fixed in portage. Thanks Guy :) This patch for all the officially supported architectures leaves uname segfaulting on -a/-i/-p when compiled on anything else - not good. Kolbj Kolbjørn, could you explain please what you mean? yeah, you cant sit there and say something crashes Kolbj yeah, you cant sit there and say something crashes Kolbjørn when you dont provide any information uname -a/i/p works fine on my x86/hppa/ppc/arm Line 138-196 of uname.c The '*sdata[] = {}' part does not contain any escape for non listed platforms, gived that USE_PROCINFO is defined. For this means that uname segfaults on m68k. ok, i didnt realize that the procinfo support isnt from upstream in the first place ... i'll update the code so it'll work on any arch (and add some more code for ARM :D) coreutils-5.2.1 has this fixed ... i integrated the s390 patch (dont know why they didnt :P), added a case for arm, and added a default case for other architectures ... coreutils-5.2.1-gentoo-0.3.tar.bz2 has these changes ... no rev bump because installed base shouldnt be any different |