Bug 221645 - www/webkit2-gtk3 build fails on PPC because of exception for PPC
Summary: www/webkit2-gtk3 build fails on PPC because of exception for PPC
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: powerpc Any
: --- Affects Only Me
Assignee: freebsd-gnome (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-20 07:19 UTC by Robin
Modified: 2018-05-18 19:37 UTC (History)
4 users (show)

See Also:
bugzilla: maintainer-feedback? (gnome)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robin 2017-08-20 07:19:59 UTC
This build fails with the following error:

Source/JavaScriptCore/heap/MachineStackMarker.cpp: In function 'void pthreadSignalHandlerSuspendResume(int, siginfo_t*, void*)':
Source/JavaScriptCore/heap/MachineStackMarker.cpp:92:69: error: 'mcontext_t {aka struct __mcontext}' has no member named 'uc_regs'
     threadData->suspendedMachineContext = *userContext->uc_mcontext.uc_regs;
                                                                     ^
ninja: build stopped: subcommand failed.


There is an exception in MachineStackMarker.cpp for PowerPC to use uc_regs, which is not declared on PowerPC, so this does not make much sense:

    ucontext_t* userContext = static_cast<ucontext_t*>(ucontext);
#if CPU(PPC)
    threadData->suspendedMachineContext = *userContext->uc_mcontext.uc_regs;
#else
    threadData->suspendedMachineContext = userContext->uc_mcontext;
#endif


Here is the definition of mcontext_t on PowerPC for reference:

typedef struct __mcontext {
        int             mc_vers;
        int             mc_flags;
#define _MC_FP_VALID    0x01
#define _MC_AV_VALID    0x02
        int             mc_onstack;             /* saved onstack flag */
        int             mc_len;                 /* sizeof(__mcontext) */
        uint64_t        mc_avec[32*2];          /* vector register file */
        uint32_t        mc_av[2];
        register_t      mc_frame[42];
        uint64_t        mc_fpreg[33];
} mcontext_t __aligned(16);


Removing the exception allows the build to continue.
Comment 1 Justin Hibbits freebsd_committer freebsd_triage 2018-01-30 16:10:51 UTC
Looks like this can be fixed by events with bug 223733.  The function in question was removed sometime between 2.16.6 and 2.18.3 (Probably during 2.17 timeframe).
Comment 2 Koop Mast freebsd_committer freebsd_triage 2018-05-18 19:37:17 UTC
Thanks Justin Hibbits for the feedback.