VirtualBox

Changeset 3341 in kBuild for trunk/src


Ignore:
Timestamp:
May 20, 2020 2:33:15 PM (5 years ago)
Author:
bird
Message:

kDevObj: Ignore no-dependencies problems with object that doesn't contain data. This is needed for VCC 14.0 even when using -ZH:SHA_256. 14.1 and later only has this problem when not using the sha-256 option.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kmk/kmkbuiltin/kDepObj.c

    r3324 r3341  
    772772    unsigned                            iSHdr;
    773773    KPCUINT                             u;
     774    KBOOL                               fDebugS    = K_FALSE;
    774775    int                                 rcRet      = 2;
    775776    int                                 rc;
     
    806807            if (rcRet != 2)
    807808                return rc;
     809            fDebugS = K_TRUE;
    808810        }
    809811        dprintf(("#%d: %.8s\n", iSHdr, paSHdrs[iSHdr].Name));
    810812    }
     813
     814    /* If we found no dependencies but did find a .debug$S section, check if
     815       this is a case where the compile didn't emit any because there is no
     816       code in this compilation unit. */
     817    if (rcRet == 2)
     818    {
     819        if (fDebugS)
     820        {
     821            for (iSHdr = 0; iSHdr < cSHdrs; iSHdr++)
     822                if (!memcmp(paSHdrs[iSHdr].Name, ".text", sizeof(".text") - 1))
     823                    return kDepErr(pThis, 2, "%s: no dependencies (has text).", pThis->pszFile);
     824            warnx(pThis->pCtx, "%s: no dependencies, but also no text, so probably (mostly) harmless.", pThis->pszFile);
     825            return 0;
     826        }
     827        kDepErr(pThis, 2, "%s: no dependencies.", pThis->pszFile);
     828    }
     829
    811830    return rcRet;
    812831}
     
    11631182            if (!pInput)
    11641183                return err(pCtx, 1, "Failed to open input file '%s'", argv[i]);
     1184            This.pszFile = argv[i];
    11651185            fInput = 1;
    11661186        }
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette