prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Installation on Armv6l creates a Linux-32bit-unknown bootloader.
  ## Description of the issue
  When installing on a RPi 1b you get an incorrectly named bootloader created. The directory is called Linux-32bit-unknown and not Linux-32bit-arm.
  
  ### Context information (for bug reports)
  
  * Output of `pyinstaller --version`: ```4.8```
  * Version of Python: <!-- e.g. 3.7 --> 3.7
  * Platform: <!-- e.g GNU/Linux (distribution), Windows (language settings), OS X, FreeBSD --> Raspbian GNU/Linux 10 (buster)* How you installed Python: <!-- e.g. python.org/downloads, conda, brew, pyenv, apt, Windows store -->pip3 install pyinstaller
  * Did you also try this on another platform? Does it work there? yes.
  
  
  
    * [x] start with clean installation
    * [x] use the latest development version
  
  
  </issue>
  <code>
  [start of PyInstaller/_shared_with_waf.py]
  1 #-----------------------------------------------------------------------------
  2 # Copyright (c) 2005-2021, PyInstaller Development Team.
  3 #
  4 # Distributed under the terms of the GNU General Public License (version 2
  5 # or later) with exception for distributing the bootloader.
  6 #
  7 # The full license is in the file COPYING.txt, distributed with this software.
  8 #
  9 # SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
  10 #-----------------------------------------------------------------------------
  11 """
  12 Code to be shared by PyInstaller and the bootloader/wscript file.
  13 
  14 This code must not assume that either PyInstaller or any of its dependencies installed. I.e., the only imports allowed
  15 in here are standard library ones. Within reason, it is preferable that this file should still run under Python 2.7 as
  16 many compiler docker images still have only Python 2 installed.
  17 """
  18 
  19 import platform
  20 import re
  21 
  22 
  23 def _pyi_machine(machine, system):
  24     # type: (str, str) -> str
  25     """
  26     Choose an intentionally simplified architecture identifier to be used in the bootloader's directory name.
  27 
  28     Args:
  29         machine:
  30             The output of ``platform.machine()`` or any known architecture alias or shorthand that may be used by a
  31             C compiler.
  32         system:
  33             The output of ``platform.system()`` on the target machine.
  34     Returns:
  35         Either a string tag or, on platforms that don't need an architecture tag, ``None``.
  36 
  37     Ideally, we would just use ``platform.machine()`` directly, but that makes cross-compiling the bootloader almost
  38     impossible, because you need to know at compile time exactly what ``platform.machine()`` will be at run time, based
  39     only on the machine name alias or shorthand reported by the C compiler at the build time. Rather, use a loose
  40     differentiation, and trust that anyone mixing armv6l with armv6h knows what they are doing.
  41     """
  42     # See the corresponding tests in tests/unit/test_compat.py for examples.
  43 
  44     if platform.machine() == "sw_64" or platform.machine() == "loongarch64":
  45         # This explicitly inhibits cross compiling the bootloader for or on SunWay and LoongArch machine.
  46         return platform.machine()
  47 
  48     if system != "Linux":
  49         # No architecture specifier for anything par Linux.
  50         # - Windows only has one 32 and one 64 bit architecture, but lots of aliases for each so it is both pointless
  51         #   and painful to give Windows an architecture specifier.
  52         # - macOS is on two 64 bit architectures, but they are merged into one "universal2" bootloader.
  53         # - BSD supports a wide range of architectures, but according to PyPI's download statistics, every one of our
  54         #   BSD users are on x86_64. This may change in the distant future.
  55         return
  56 
  57     if machine.startswith(("arm", "aarch")):
  58         # ARM has a huge number of similar and aliased sub-versions, such as armv5, armv6l armv8h, aarch64.
  59         return "arm"
  60     if machine in ("x86_64", "x64", "x86"):
  61         return "intel"
  62     if re.fullmatch("i[1-6]86", machine):
  63         return "intel"
  64     if machine.startswith(("ppc", "powerpc")):
  65         # PowerPC comes in 64 vs 32 bit and little vs big endian variants.
  66         return "ppc"
  67     if machine in ("mips64", "mips"):
  68         return "mips"
  69     # Machines with no known aliases :)
  70     if machine in ("s390x",):
  71         return machine
  72 
  73     # Unknown architectures are allowed by default, but will all be placed under one directory. In theory, trying to
  74     # have multiple unknown architectures in one copy of PyInstaller will not work, but that should be sufficiently
  75     # unlikely to ever happen.
  76     return "unknown"
  77
  [end of PyInstaller/_shared_with_waf.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/PyInstaller/_shared_with_waf.py b/PyInstaller/_shared_with_waf.py
  --- a/PyInstaller/_shared_with_waf.py
  +++ b/PyInstaller/_shared_with_waf.py
  @@ -57,6 +57,10 @@
       if machine.startswith(("arm", "aarch")):
           # ARM has a huge number of similar and aliased sub-versions, such as armv5, armv6l armv8h, aarch64.
           return "arm"
  +    if machine in ("thumb"):
  +        # Reported by waf/gcc when Thumb instruction set is enabled on 32-bit ARM. The platform.machine() returns "arm"
  +        # regardless of the instruction set.
  +        return "arm"
       if machine in ("x86_64", "x64", "x86"):
           return "intel"
       if re.fullmatch("i[1-6]86", machine):
  
verification_info: {"golden_diff": "diff --git a/PyInstaller/_shared_with_waf.py b/PyInstaller/_shared_with_waf.py\n--- a/PyInstaller/_shared_with_waf.py\n+++ b/PyInstaller/_shared_with_waf.py\n@@ -57,6 +57,10 @@\n     if machine.startswith((\"arm\", \"aarch\")):\n         # ARM has a huge number of similar and aliased sub-versions, such as armv5, armv6l armv8h, aarch64.\n         return \"arm\"\n+    if machine in (\"thumb\"):\n+        # Reported by waf/gcc when Thumb instruction set is enabled on 32-bit ARM. The platform.machine() returns \"arm\"\n+        # regardless of the instruction set.\n+        return \"arm\"\n     if machine in (\"x86_64\", \"x64\", \"x86\"):\n         return \"intel\"\n     if re.fullmatch(\"i[1-6]86\", machine):\n", "issue": "Installation on Armv6l creates a Linux-32bit-unknown bootloader.\n## Description of the issue\r\nWhen installing on a RPi 1b you get an incorrectly named bootloader created. The directory is called Linux-32bit-unknown and not Linux-32bit-arm.\r\n\r\n### Context information (for bug reports)\r\n\r\n* Output of `pyinstaller --version`: ```4.8```\r\n* Version of Python: <!-- e.g. 3.7 --> 3.7\r\n* Platform: <!-- e.g GNU/Linux (distribution), Windows (language settings), OS X, FreeBSD --> Raspbian GNU/Linux 10 (buster)* How you installed Python: <!-- e.g. python.org/downloads, conda, brew, pyenv, apt, Windows store -->pip3 install pyinstaller\r\n* Did you also try this on another platform? Does it work there? yes.\r\n\r\n\r\n\r\n  * [x] start with clean installation\r\n  * [x] use the latest development version\r\n\n", "before_files": [{"content": "#-----------------------------------------------------------------------------\n# Copyright (c) 2005-2021, PyInstaller Development Team.\n#\n# Distributed under the terms of the GNU General Public License (version 2\n# or later) with exception for distributing the bootloader.\n#\n# The full license is in the file COPYING.txt, distributed with this software.\n#\n# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)\n#-----------------------------------------------------------------------------\n\"\"\"\nCode to be shared by PyInstaller and the bootloader/wscript file.\n\nThis code must not assume that either PyInstaller or any of its dependencies installed. I.e., the only imports allowed\nin here are standard library ones. Within reason, it is preferable that this file should still run under Python 2.7 as\nmany compiler docker images still have only Python 2 installed.\n\"\"\"\n\nimport platform\nimport re\n\n\ndef _pyi_machine(machine, system):\n    # type: (str, str) -> str\n    \"\"\"\n    Choose an intentionally simplified architecture identifier to be used in the bootloader's directory name.\n\n    Args:\n        machine:\n            The output of ``platform.machine()`` or any known architecture alias or shorthand that may be used by a\n            C compiler.\n        system:\n            The output of ``platform.system()`` on the target machine.\n    Returns:\n        Either a string tag or, on platforms that don't need an architecture tag, ``None``.\n\n    Ideally, we would just use ``platform.machine()`` directly, but that makes cross-compiling the bootloader almost\n    impossible, because you need to know at compile time exactly what ``platform.machine()`` will be at run time, based\n    only on the machine name alias or shorthand reported by the C compiler at the build time. Rather, use a loose\n    differentiation, and trust that anyone mixing armv6l with armv6h knows what they are doing.\n    \"\"\"\n    # See the corresponding tests in tests/unit/test_compat.py for examples.\n\n    if platform.machine() == \"sw_64\" or platform.machine() == \"loongarch64\":\n        # This explicitly inhibits cross compiling the bootloader for or on SunWay and LoongArch machine.\n        return platform.machine()\n\n    if system != \"Linux\":\n        # No architecture specifier for anything par Linux.\n        # - Windows only has one 32 and one 64 bit architecture, but lots of aliases for each so it is both pointless\n        #   and painful to give Windows an architecture specifier.\n        # - macOS is on two 64 bit architectures, but they are merged into one \"universal2\" bootloader.\n        # - BSD supports a wide range of architectures, but according to PyPI's download statistics, every one of our\n        #   BSD users are on x86_64. This may change in the distant future.\n        return\n\n    if machine.startswith((\"arm\", \"aarch\")):\n        # ARM has a huge number of similar and aliased sub-versions, such as armv5, armv6l armv8h, aarch64.\n        return \"arm\"\n    if machine in (\"x86_64\", \"x64\", \"x86\"):\n        return \"intel\"\n    if re.fullmatch(\"i[1-6]86\", machine):\n        return \"intel\"\n    if machine.startswith((\"ppc\", \"powerpc\")):\n        # PowerPC comes in 64 vs 32 bit and little vs big endian variants.\n        return \"ppc\"\n    if machine in (\"mips64\", \"mips\"):\n        return \"mips\"\n    # Machines with no known aliases :)\n    if machine in (\"s390x\",):\n        return machine\n\n    # Unknown architectures are allowed by default, but will all be placed under one directory. In theory, trying to\n    # have multiple unknown architectures in one copy of PyInstaller will not work, but that should be sufficiently\n    # unlikely to ever happen.\n    return \"unknown\"\n", "path": "PyInstaller/_shared_with_waf.py"}]}