Fix 'sign-compare' error in unordered_ring_mpsc.hh

Fixes the following error when compiling osv on my Archlinux machine
with gcc 4.9:

  In file included from tst-unordered-ring-mpsc.cc:12:0:
  unordered_ring_mpsc.hh:40:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
               if (_idx >= _ring.rings.size()) {
                      ^
  unordered_ring_mpsc.hh:48:33: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
               do {} while (++_idx < _ring.rings.size() && !_ring.rings[_idx].pop(_element));

Reviewed-by: Tomasz Grabiec <tgrabiec@gmail.com>
Signed-off-by: Zifei Tong <zifeitong@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
build: change libgcc_s.a to libgcc.a

Fixes the following error with gcc 4.9 (build_env=host)
  osv/include/api/sched.h:125: undefined reference to `__popcountdi2'

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Reported-by: Minoru KANATSU <icc.pot.tyew272@gmail.com>
Signed-off-by: Zifei Tong <zifeitong@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
build: fix tst-static-thread-variable.so dependencies (again)

Commit 7a69d0d8 and 99d80368 introduced:

  tests/tst-static-thread-variable.so: COMMON += -L./tests -lstatic-thread-variable

However make variables are inherited by prerequisites, which will cause
libstatic-thread-variable.so being added as its dependencies itself,
resulting in this error:

  ./tests/libstatic-thread-variable.so: file not recognized: File truncated

Add 'private' keyword [1] to surpass the inheritance.

[1]: https://www.gnu.org/software/make/manual/html_node/Suppressing-Inheritance.html

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Zifei Tong <zifeitong@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
scripts: encode string before use it as buffer

In python3, string and bytearray are now different.

This patch fixes:
  Adding /usr/lib/jvm/java/lib/tools.jar...
  Traceback (most recent call last):
    File "osv/scripts/upload_manifest.py", line 192, in <module>
        main()
      File "osv/scripts/upload_manifest.py", line 180, in main
        upload(osv, manifest, depends)
      File "osv/scripts/upload_manifest.py", line 120, in upload
        cpio_send(link)
      File "osv/scripts/upload_manifest.py", line 80, in cpio_send
        s.sendall(data)
    TypeError: 'str' does not support the buffer interface.

Signed-off-by: Zifei Tong <zifeitong@gmail.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Merge branch 'archlinux-build-fixes'