def arch2arch(arch):
    """Remap certain arch strings which are known to not be supportable"""
    # pylint: disable=too-many-return-statements
    if arch == "rv32ea":
        return "rv32e"
    if arch in ["rv32ema", "rv32emc"]:
        return "rv32em"

    if arch == "rv32ia":
        return "rv32i"
    if arch == "rv32ima":
        return "rv32im"

    if arch == "rv64ia":
        return "rv64i"
    if arch == "rv64ima":
        return "rv64im"

    return arch