Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Mar 2015 17:12:34 -0700
From:      Mark Millard <markmi@dsl-only.net>
To:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   11.0-CURRENT: ofw_standard.c:175 (for example): attempts to cast char* to cell_t fail in cross compile from powerpc to powerpc64
Message-ID:  <F424563F-14D0-4F3C-B026-B7154B513A9D@dsl-only.net>

next in thread | raw e-mail | index | archive | help
Basic context (on a PowerMac G5 but using a powerpc 11.0-CURRENT build =
to cross build targeting powerpc64):

# freebsd-version -ku; uname -a
11.0-CURRENT
11.0-CURRENT
FreeBSD FBSDG4C0 11.0-CURRENT FreeBSD 11.0-CURRENT #0 r279514M: Mon Mar  =
9 22:24:27 PDT 2015     =
root@FBSDG4S0:/usr/obj/usr/srcC/sys/GENERICvtsc-NODEBUG  powerpc
# svnlite info
Path: .
Working Copy Root Path: /usr/srcC
URL: https://svn0.us-west.freebsd.org/base/head
Relative URL: ^/head
Repository Root: https://svn0.us-west.freebsd.org/base
Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
Revision: 279514
Node Kind: directory
Schedule: normal
Last Changed Author: adrian
Last Changed Rev: 279514
Last Changed Date: 2015-03-01 18:27:25 -0800 (Sun, 01 Mar 2015)


The problem for building powerpc64 kernels from a powerpc build's =
context...

I tried to buildworld buildkernel with TARGET=3Dpowerpc =
TARGET_ARCH=3Dpowerpc64. while buildworld completed buildkernel did not.

I give the relevant part of the script output file below but the basic =
problem shows up as point to integer conversions with mismatched sizes =
in code casting (for example) char* to cell_t such as:

static int
ofw_std_test(ofw_t ofw, const char *name)
{
        struct {
                cell_t name;
                cell_t nargs;
                cell_t nreturns;
                cell_t service;
                cell_t missing;
        } args =3D {
                (cell_t)"test", // <<<<<<<<<< LOOK HERE
                1,
                1,
        };
=20
        args.service =3D (cell_t)name; // <<<<<<<<<< LOOK HERE
        if (openfirmware(&args) =3D=3D -1)
                return (-1);
        return (args.missing);
}


The script log shows:

...
ctfconvert -L VERSION -g ofwbus.o^M
cc  -c -O -pipe  -g -Wall -Wredundant-decls -Wnested-externs =
-Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline =
-Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  -Wmissing-in
clude-dirs -fdiagnostics-show-option  -Wno-unknown-pragmas  =
-Wno-uninitialized -nostdinc  -I. -I/usr/srcC/sys =
-I/usr/srcC/sys/contrib/altq -I/usr/srcC/sys/contrib/libfdt -D_KERNEL =
-DHAVE_KERNEL_OPTION
_HEADERS -include opt_global.h  -msoft-float -Wa,-many =
-fno-omit-frame-pointer -mno-altivec -ffreestanding -fwrapv =
-fstack-protector -gdwarf-2 -Wno-uninitialized -Wall -Wredundant-decls =
-Wnested-exter
ns -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline =
-Wcast-qual  -Wundef -Wno-pointer-sign -fformat-extensions  =
-Wmissing-include-dirs -fdiagnostics-show-option  -Wno-unknown-pragmas
  -Wno-uninitialized  -fno-common -fms-extensions -finline-limit=3D15000 =
--param inline-unit-growth=3D100 --param large-function-growth=3D1000 =
-msoft-float  -std=3Diso9899:1999 -Werror  /usr/srcC/sys/dev/ofw/
ofw_standard.c^M
cc1: warnings being treated as errors^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_test':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:175: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:180: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_interpret':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:195: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:202: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_peer':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:226: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_child':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:248: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_parent':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:270: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function =
'ofw_std_instance_to_package':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:292: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function =
'ofw_std_getproplen':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:315: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:321: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_getprop':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:342: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:348: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:349: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_nextprop':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:370: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:376: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:377: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_setprop':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:399: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:405: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:406: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_canon':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:426: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:431: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:432: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function =
'ofw_std_finddevice':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:450: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:455: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function =
'ofw_std_instance_to_path':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:474: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:480: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function =
'ofw_std_package_to_path':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:500: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:506: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function =
'ofw_std_call_method':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:526: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:537: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_open':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:567: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:572: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_close':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:588: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_read':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:610: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:616: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_write':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:637: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:643: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_seek':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:663: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_claim':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:693: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:698: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:703: warning: cast to pointer from =
integer of different size [-Wint-to-pointer-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_release':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:717: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:722: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_enter':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:740: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
/usr/srcC/sys/dev/ofw/ofw_standard.c: In function 'ofw_std_exit':^M
/usr/srcC/sys/dev/ofw/ofw_standard.c:758: warning: cast from pointer to =
integer of different size [-Wpointer-to-int-cast]^M
*** Error code 1^M
^M
Stop.^M
make[2]: stopped in =
/usr/obj/powerpc.powerpc64/usr/srcC/sys/GENERICvtsc-NODEBUG^M
*** Error code 1^M
^M
Stop.^M
make[1]: stopped in /usr/srcC^M
*** Error code 1^M


=3D=3D=3D
Mark Millard
markmi at dsl-only.net




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?F424563F-14D0-4F3C-B026-B7154B513A9D>